- 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.
- Activate the virtualenv you created in the Developing web applications with GeoDjango –Part 1) recipe, as follows:
-
- Use the following command for Linux:
$ cd ~/virtualenvs/ $ source chp09-env/bin/activate
-
- Use the following command for Windows:
cd c:\virtualenvs > chp09-env\Scripts\activate
- 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:
-
- Use the following command for Linux:
(chp09-env)$ pip install simplejson
(chp09-env)$ pip install vectorformats
-
- Use the following command for Windows:
(chp09-env) C:\virtualenvs> pip install simplejson
(chp09-env) C:\virtualenvs> pip install vectorformats