Opened 14 years ago

Last modified 14 years ago

#13715 closed

Creating GeoDjango model in shell does not work — at Initial Version

Reported by: drdee Owned by: nobody
Component: GIS Version: 1.2
Severity: Keywords: geodjango, postgresql 8.4, postgis 1.5
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When you start the shell (python manage.py shell) and paste the following code (pasted from http://docs.djangoproject.com/en/dev/ref/contrib/gis/model-api/):

from django.contrib.gis.db import models

class Zipcode(models.Model):

code = models.CharField(max_length=5)
poly = models.PolygonField()
objects = models.GeoManager()

then you receive the following error 'list index out of range'

line 49:kwargs = {"app_label": model_module.name.split('.')[-2]}

the model_module refers to: <module 'main' from '/Library/Python/2.5/site-packages/IPython/FakeModule.pyc'>

This happens with Postgresql 8.4, postgis 1.5.1, OSX 10.5, python 2.5.2

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top