diff options
author | luxagraf <sng@luxagraf.net> | 2013-05-15 13:02:24 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2013-05-15 13:02:24 -0400 |
commit | aa7bc766ac27c669162bf903711c54f74f3758b1 (patch) | |
tree | 80b6ef1b87f5005171fddda5349959226fd2b930 /app/guide | |
parent | ccc6f1af97e2630eb9b5a9b043f308030e61fdbc (diff) |
fixed image thumbnails, expanded body text entry field, switched map to OSM and added the ability to associate asides with an entry -- still need to add javascript to dynamically create asides.
Diffstat (limited to 'app/guide')
-rw-r--r-- | app/guide/admin.py | 6 | ||||
-rw-r--r-- | app/guide/models.py | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/app/guide/admin.py b/app/guide/admin.py index 55f713f..cd24ab3 100644 --- a/app/guide/admin.py +++ b/app/guide/admin.py @@ -10,12 +10,12 @@ from django.conf import settings GMAP = GoogleMap(key=settings.GOOGLE_MAPS_API_KEY) class GuideAdmin(OSMGeoAdmin): - list_display = ('title', 'pub_date','template_name', 'status','region','location','photo_gallery') + list_display = ('title', 'pub_date','template_name', 'status','location','photo_gallery') search_fields = ['title', 'body_markdown'] prepopulated_fields = {"slug" : ('title',)} - list_filter = ('pub_date', 'status','region','location') + list_filter = ('pub_date', 'status','location__state__country__lux_region','location') fieldsets = ( - ('Note', {'fields': ('title','body_markdown', ('location','region'), 'pub_date', 'status', 'slug','photo_gallery'), 'classes': ('show','extrapretty','wide')}), + ('Note', {'fields': ('title','body_markdown', ('location'), 'pub_date', 'status', 'slug','photo_gallery'), 'classes': ('show','extrapretty','wide')}), ('Extra', {'fields': ('dek', 'meta_description','template_name', ('image', 'thumbnail')), 'classes': ('collapse', 'wide')}), ) diff --git a/app/guide/models.py b/app/guide/models.py index 2e19006..5a2036d 100644 --- a/app/guide/models.py +++ b/app/guide/models.py @@ -47,19 +47,13 @@ class Guide(models.Model): dek = models.TextField(null=True,blank=True) pub_date = models.DateTimeField('Date published') location = models.ForeignKey(Location, null=True, blank=True) - country = models.ForeignKey(Country, null=True, blank=True) - region = models.ForeignKey(Region, null=True, blank=True) status = models.IntegerField(choices=PUB_STATUS, default=0) photo_gallery = models.ForeignKey(PhotoGallery, blank=True, null=True, verbose_name='photo set') meta_description = models.CharField(max_length=256, null=True, blank=True) template_name = models.IntegerField(choices=TEMPLATES, default=0) tags = TaggableManager(blank=True) image = models.FileField(upload_to=get_upload_path, null=True,blank=True) - image_height = models.CharField(max_length=20, null=True,blank=True) - image_width = models.CharField(max_length=20, null=True,blank=True) thumbnail = models.FileField(upload_to=get_tn_path, null=True,blank=True) - thumb_height = models.CharField(max_length=20, null=True,blank=True) - thumb_width = models.CharField(max_length=20, null=True,blank=True) @property |