diff options
author | luxagraf <sng@luxagraf.net> | 2012-10-14 22:26:39 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-10-14 22:26:39 -0400 |
commit | fa869d1a60ff6f8c41cd7f2bf0e0964bff9ba9f1 (patch) | |
tree | f60ab325dbaf6a4dab443daa3f8fea84edba4a1d /app/projects/admin.py | |
parent | 27e05eaae0dd829090749facc5e10ca0a7b9a5dc (diff) |
converted publishing system to have buttons int the admin and reworked the config system
Diffstat (limited to 'app/projects/admin.py')
-rw-r--r-- | app/projects/admin.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/projects/admin.py b/app/projects/admin.py index 94c4780..13357b0 100644 --- a/app/projects/admin.py +++ b/app/projects/admin.py @@ -7,6 +7,7 @@ from django.conf import settings from projects.models.base import Project from projects.models.fiveby import FiveBy from projects.models.natparks import NationalParks +from projects.models.gifs import AnimatedGif GMAP = GoogleMap(key=settings.GOOGLE_MAPS_API_KEY) @@ -174,9 +175,17 @@ class CodeAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('name','date_created','slug','status','body_html')}), ) - -admin.site.register(Code, CodeAdmin) +class AnimatedGifAdmin(admin.ModelAdmin): + list_display = ('title', 'date_created') + search_fields = ['title',] + fieldsets = ( + (None, {'fields': ('title','gif','date_created','slug','music_ogg','music_mp3')}), + ) + + +admin.site.register(AnimatedGif, AnimatedGifAdmin) +admin.site.register(Code, CodeAdmin) admin.site.register(Project, ProjectAdmin) admin.site.register(FiveBy, FiveByAdmin) -admin.site.register(NationalParks, NationalParksAdmin)
\ No newline at end of file +admin.site.register(NationalParks, NationalParksAdmin) |