diff options
| author | Justin Bronn <jbronn@gmail.com> | 2008-04-01 22:40:32 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2008-04-01 22:40:32 +0000 |
| commit | 282bccfbc17d22f52b213d21cae07d2c9f0d0b08 (patch) | |
| tree | 40edaaf1f3675a7892a8d35bcd972f8e1e3ae807 | |
| parent | f273b371a4c0e46fcdc97c68f459f8da0b777ca7 (diff) | |
gis: Fixed geographic models produced by `inspectdb`.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/gis/management/commands/inspectdb.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/gis/management/commands/inspectdb.py b/django/contrib/gis/management/commands/inspectdb.py index ebc5f5de3e..05e205353c 100644 --- a/django/contrib/gis/management/commands/inspectdb.py +++ b/django/contrib/gis/management/commands/inspectdb.py @@ -183,6 +183,8 @@ class Command(InspectCommand): if comment_notes: field_desc += ' # ' + ' '.join(comment_notes) yield ' %s' % field_desc + if table_name in geo_cols: + yield ' objects = models.GeoManager()' yield ' class Meta:' yield ' db_table = %r' % table_name yield '' |
