Skip to content

Commit c8c59c8

Browse files
committed
Fixed #13267 -- Updated GeoDjango tutorial for the 1.4 release. Thanks samueladam for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent ecf75e5 commit c8c59c8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/ref/contrib/gis/tutorial.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ the ``geodjango`` project:
100100
Configure ``settings.py``
101101
-------------------------
102102

103-
The ``geodjango`` project settings are stored in the ``settings.py`` file. Edit
104-
the database connection settings appropriately::
103+
The ``geodjango`` project settings are stored in the ``geodjango/settings.py``
104+
file. Edit the database connection settings appropriately::
105105

106106
DATABASES = {
107107
'default': {
@@ -111,10 +111,6 @@ the database connection settings appropriately::
111111
}
112112
}
113113

114-
.. note::
115-
116-
These database settings are for Django 1.2 and above.
117-
118114
In addition, modify the :setting:`INSTALLED_APPS` setting to include
119115
:mod:`django.contrib.admin`, :mod:`django.contrib.gis`,
120116
and ``world`` (our newly created application)::
@@ -124,6 +120,8 @@ and ``world`` (our newly created application)::
124120
'django.contrib.contenttypes',
125121
'django.contrib.sessions',
126122
'django.contrib.sites',
123+
'django.contrib.messages',
124+
'django.contrib.staticfiles',
127125
'django.contrib.admin',
128126
'django.contrib.gis',
129127
'world'
@@ -362,7 +360,7 @@ tutorial, then we can determine the path using Python's built-in
362360
Now, the world borders shapefile may be opened using GeoDjango's
363361
:class:`~django.contrib.gis.gdal.DataSource` interface::
364362

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

651-
>>> from django.contrib.gis.geos import *
649+
>>> from django.contrib.gis.geos import Point, GEOSGeometry
652650
>>> pnt = Point(954158.1, 4215137.1, srid=32140)
653651

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

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

732-
Next, edit your ``urls.py`` in the ``geodjango`` project folder to look
730+
Next, edit your ``urls.py`` in the ``geodjango`` application folder to look
733731
as follows::
734732

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

740738
urlpatterns = patterns('',
741-
(r'^admin/', include(admin.site.urls)),
739+
url(r'^admin/', include(admin.site.urls)),
742740
)
743741

744742
Start up the Django development server:

0 commit comments

Comments
 (0)