Database Reference
In-Depth Information
How to do it...
Carry out the following steps:
1. Create a Django project using the django-admin command with the
startproject option.Nametheproject wildlife .Thecommandforcre-
ating the project will be as follows:
(chp09-env)$ cd ~/postgis_cookbook/
working/chp09
(chp09-env)$ django-admin.py startproject
wildlife
2. Create a Django application using the django-admin command with the
startapp option.Nametheapplication sightings .Thecommandwillbe
as follows:
(chp09-env)$ cd wildlife/
(chp09-env)$ django-admin.py startapp
sightings
Now, you should have the following directory structure:
wildlife/
├── manage.py
├── sightings
│ ├── __init__.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
└── wildlife
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
3. You will need to edit some of the settings in the settings.py file under
chp09/wildlife/wildlife . First, the DATABASES settings should be
Search WWH ::




Custom Search