Database Reference
In-Depth Information
Developing
web
applications
with
GeoDjango - part 2
Inthisrecipe,youwillcreatethefrontofficeforthewebapplicationyoucreatedusing
Django , in the previous recipe.
Using HTML and the Django template language , you will create a web page dis-
playing a map, implemented with Leaflet, and a list to the user containing all of the
sightingsavailableinthesystem.Theuserwillbeabletonavigatethemapandidenti-
fy the sightings to get more information.
Getting ready
1. Make sure you have gone through every single step of the previous recipe,
keepingthebackofficeofthewebapplicationworkinganditsdatabasepopu-
lated with some entities.
2. 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
3. Installthelibrariesthatyouwilluseinthisrecipe;youwillneed simplejson
and vectorformats Python libraries to produce a GeoJSON ( ht-
tp://www.geojson.org/ ) responsethat will feed the sighting layer in Leaflet.
• Use the following command for Linux:
Search WWH ::




Custom Search