Getting ready

  1. Make sure you have gone through every single step of the previous recipe and have kept the back office of the web application working and its database populated with some entities.
  2. Activate the virtualenv you created in the Developing web applications with GeoDjango –Part 1) recipe, as follows:
                $ cd ~/virtualenvs/ $ source chp09-env/bin/activate
                cd c:\virtualenvs > chp09-env\Scripts\activate
  1. Install the libraries that you will use in this recipe; you will need the simplejson and vectorformats Python libraries to produce a GeoJSON (http://www.geojson.org/) response that will feed the sighting layer in Leaflet:
                (chp09-env)$ pip install simplejson 
(chp09-env)$ pip install vectorformats
                (chp09-env) C:\virtualenvs> pip install simplejson 
(chp09-env) C:\virtualenvs> pip install vectorformats