Django

Code

Show
Ignore:
Timestamp:
04/01/08 17:40:32 (9 months ago)
Author:
jbronn
Message:

gis: Fixed geographic models produced by inspectdb.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/management/commands/inspectdb.py

    r7175 r7397  
    184184                    field_desc += ' # ' + ' '.join(comment_notes) 
    185185                yield '    %s' % field_desc 
     186            if table_name in geo_cols: 
     187                yield '    objects = models.GeoManager()' 
    186188            yield '    class Meta:' 
    187189            yield '        db_table = %r' % table_name