diff --git django/contrib/gis/utils/ogrinspect.py django/contrib/gis/utils/ogrinspect.py
index fe4443c..aa4e209 100644
|
|
Author: Travis Pinney, Dane Springmeyer, & Justin Bronn
|
8 | 8 | from itertools import izip |
9 | 9 | # Requires GDAL to use. |
10 | 10 | from django.contrib.gis.gdal import DataSource |
11 | | from django.contrib.gis.gdal.field import OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString |
| 11 | from django.contrib.gis.gdal.field import OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString, OFTTime |
12 | 12 | |
13 | 13 | def mapping(data_source, geom_name='geom', layer_key=0, multi_geom=False): |
14 | 14 | """ |
… |
… |
def _ogrinspect(data_source, model_name, geom_name='geom', layer_key=0, srid=Non
|
189 | 189 | yield ' %s = models.DateField(%s)' % (mfield, kwargs_str[2:]) |
190 | 190 | elif field_type is OFTDateTime: |
191 | 191 | yield ' %s = models.DateTimeField(%s)' % (mfield, kwargs_str[2:]) |
192 | | elif field_type is OFTDate: |
| 192 | elif field_type is OFTTime: |
193 | 193 | yield ' %s = models.TimeField(%s)' % (mfield, kwargs_str[2:]) |
194 | 194 | else: |
195 | 195 | raise TypeError('Unknown field type %s in %s' % (field_type, mfield)) |