timeframe models bug - add timeframe and ftypes to admin

This commit is contained in:
Sanj 2011-08-20 15:41:23 +05:30
parent bda7f3b3f1
commit 75e63566a6
2 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,8 @@ class FeatureAdmin(admin.GeoModelAdmin):
# default_lon = 72.855211097628413
# default_lat = 19.415775291486027
# default_zoom = 4
# extra_js = ['http://openstreetmap.org/openlayers/OpenStreetMap.js']
extra_js = ['http://openlayers.org/dev/OpenLayers.js', 'http://openstreetmap.org/openlayers/OpenStreetMap.js']
admin.site.register(Feature, FeatureAdmin)
admin.site.register(TimeFrame)
admin.site.register(FeatureType)

View File

@ -18,7 +18,7 @@ class Feature(models.Model):
feature_type = models.ForeignKey("FeatureType", null=True, blank=True)
geometry = models.GeometryField()
is_primary = models.BooleanField(default=True)
time_frame = models.OneToOneField("TimeFrame", null=True, blank=True)
time_frame = models.ForeignKey("TimeFrame", null=True, blank=True)
relationships = models.ManyToManyField("Feature", through='Relationship', blank=True)
objects = models.GeoManager()