Skip to content

Commit

Permalink
Fixed #13267 -- Updated GeoDjango tutorial for the 1.4 release. Thank…
Browse files Browse the repository at this point in the history
…s samueladam for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
claudep committed Mar 16, 2012
1 parent ecf75e5 commit c8c59c8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions docs/ref/contrib/gis/tutorial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ the ``geodjango`` project:
Configure ``settings.py``
-------------------------

The ``geodjango`` project settings are stored in the ``settings.py`` file. Edit
the database connection settings appropriately::
The ``geodjango`` project settings are stored in the ``geodjango/settings.py``
file. Edit the database connection settings appropriately::

DATABASES = {
'default': {
Expand All @@ -111,10 +111,6 @@ the database connection settings appropriately::
}
}

.. note::

These database settings are for Django 1.2 and above.

In addition, modify the :setting:`INSTALLED_APPS` setting to include
:mod:`django.contrib.admin`, :mod:`django.contrib.gis`,
and ``world`` (our newly created application)::
Expand All @@ -124,6 +120,8 @@ and ``world`` (our newly created application)::
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.gis',
'world'
Expand Down Expand Up @@ -362,7 +360,7 @@ tutorial, then we can determine the path using Python's built-in
Now, the world borders shapefile may be opened using GeoDjango's
:class:`~django.contrib.gis.gdal.DataSource` interface::

>>> from django.contrib.gis.gdal import *
>>> from django.contrib.gis.gdal import DataSource
>>> ds = DataSource(world_shp)
>>> print ds
/ ... /geodjango/world/data/TM_WORLD_BORDERS-0.3.shp (ESRI Shapefile)
Expand Down Expand Up @@ -648,7 +646,7 @@ example, the coordinate will be expressed in terms of `EPSG SRID 32140`__,
a coordinate system specific to south Texas **only** and in units of
**meters** and not degrees::

>>> from django.contrib.gis.geos import *
>>> from django.contrib.gis.geos import Point, GEOSGeometry
>>> pnt = Point(954158.1, 4215137.1, srid=32140)

Note that ``pnt`` may also be constructed with EWKT, an "extended" form of
Expand Down Expand Up @@ -729,7 +727,7 @@ Let's dive in again -- create a file called ``admin.py`` inside the

admin.site.register(WorldBorder, admin.GeoModelAdmin)

Next, edit your ``urls.py`` in the ``geodjango`` project folder to look
Next, edit your ``urls.py`` in the ``geodjango`` application folder to look
as follows::

from django.conf.urls import patterns, url, include
Expand All @@ -738,7 +736,7 @@ as follows::
admin.autodiscover()

urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
url(r'^admin/', include(admin.site.urls)),
)

Start up the Django development server:
Expand Down

0 comments on commit c8c59c8

Please sign in to comment.