mirror of
https://github.com/django/django.git
synced 2025-07-19 09:09:13 +00:00
[1.9.x] Used relative models imports in the GIS tutorial.
Backport of bb7042cda from master.
This commit is contained in:
parent
07ffee6411
commit
9357fdb613
@ -435,7 +435,7 @@ with the following code::
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from django.contrib.gis.utils import LayerMapping
|
from django.contrib.gis.utils import LayerMapping
|
||||||
from models import WorldBorder
|
from .models import WorldBorder
|
||||||
|
|
||||||
world_mapping = {
|
world_mapping = {
|
||||||
'fips' : 'FIPS',
|
'fips' : 'FIPS',
|
||||||
@ -706,7 +706,7 @@ Let's dive right in. Create a file called ``admin.py`` inside the
|
|||||||
``world`` application with the following code::
|
``world`` application with the following code::
|
||||||
|
|
||||||
from django.contrib.gis import admin
|
from django.contrib.gis import admin
|
||||||
from models import WorldBorder
|
from .models import WorldBorder
|
||||||
|
|
||||||
admin.site.register(WorldBorder, admin.GeoModelAdmin)
|
admin.site.register(WorldBorder, admin.GeoModelAdmin)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user