Database Reference
In-Depth Information
Developing
web
applications
with
GeoDjango - part 1
Inthisrecipeandthenext,youwillusethe Django ,aPythonwebframework,tocre-
ateawebapplicationtomanagewildlifesightingsusingaPostGISdatastore.Inthis
recipe,youwillbuildthebackofficeofthewebapplication,basedontheDjangoad-
min site.
Upon accessing the back office, an administrative user will be able to, after authen-
tication,manage(insert,update,anddelete)themainentities(animalsandsightings)
ofthedatabase.Inthenextpartoftherecipe,youwillbuildafrontofficethatdisplays
the sightings on a map based on the Leaflet JavaScript library.
Note
You can find a copy of the whole project that you are going to build in the code
bundleunder chp09/wildlife .Refertoitifaconceptisnotclear,orifyouwant
tocopyandpastethecodeasyougothroughthestepsoftherecipe,ratherthan
typing code from scratch.
Getting ready
1. If you are new to Django, check out the official Django tutorial at ht-
tps://docs.djangoproject.com/en/dev/intro/tutorial01/ , and then return to this
recipe.
2. Create a Python virtualenv ( http://www.virtualenv.org/en/latest/ ) to create an
isolated Python environment tousewiththewebapplication youwillbuildin
this recipe and the next. Then, activate the environment, as follows:
• Use the following commands in Linux:
$ cd ~/virtualenvs/
$ virtualenv
--no-site-packages chp09-env
Search WWH ::




Custom Search