diff options
author | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-05-06 22:46:22 +0000 |
---|---|---|
committer | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-05-06 22:46:22 +0000 |
commit | 940e343ee500a990a2be45578708d3f5d9875263 (patch) | |
tree | 4f57ac3a994434582047decfa439d6c50b8a7f68 /apps/locations | |
parent | 1b8c0ae77d1ffe6fe9af30e2c1646ea7cd2466c6 (diff) |
revamped slideshow with jquery, maps and exif data
Diffstat (limited to 'apps/locations')
-rw-r--r-- | apps/locations/admin.py | 7 | ||||
-rw-r--r-- | apps/locations/models.py | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/locations/admin.py b/apps/locations/admin.py index 7fcfee5..77d1bb3 100644 --- a/apps/locations/admin.py +++ b/apps/locations/admin.py @@ -136,7 +136,7 @@ admin.site.register(Country,CountryAdmin) class StateAdmin(OSMGeoAdmin): # Standard Django Admin Options - list_display = ('name','slug','country') + list_display = ('name','code','slug','country') prepopulated_fields = {'slug': ('name',)} search_fields = ('name','country') ordering = ('name',) @@ -144,7 +144,7 @@ class StateAdmin(OSMGeoAdmin): search_fields = ['name',] list_select_related = True fieldsets = ( - ('Location', {'fields': ('name','slug','pub_date','country'), 'classes': ('show','extrapretty')}), + ('Location', {'fields': ('name','slug','code','pub_date','country'), 'classes': ('show','extrapretty')}), ('Editable Map View', {'fields': ('geometry',), 'classes': ('show', 'wide')}), ) extra_js = [GMAP.api_url + GMAP.key] @@ -238,4 +238,5 @@ class LocationAdmin(OSMGeoAdmin): # Finally, with these options set now register the model # associating the Options with the actual model -admin.site.register(Location,LocationAdmin)
\ No newline at end of file +admin.site.register(Location,LocationAdmin) + diff --git a/apps/locations/models.py b/apps/locations/models.py index 57806a2..47c5d65 100644 --- a/apps/locations/models.py +++ b/apps/locations/models.py @@ -126,6 +126,7 @@ class State(models.Model): name = models.CharField(max_length=250, blank=True, null=True,) country = models.ForeignKey(Country) slug = models.SlugField() + code = models.CharField(max_length=2, null=True, blank=True) pub_date = models.DateTimeField('Date published',null=True) geometry = models.MultiPolygonField(srid=4326,null=True) objects = models.GeoManager() |