summaryrefslogtreecommitdiff
path: root/app/projects/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/projects/admin.py')
-rw-r--r--app/projects/admin.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/app/projects/admin.py b/app/projects/admin.py
index 13357b0..e97a261 100644
--- a/app/projects/admin.py
+++ b/app/projects/admin.py
@@ -166,7 +166,7 @@ class NationalParksAdmin(OSMGeoAdmin):
from django.contrib import admin
-from projects.models.code import Code
+from projects.models.code import Code,CodeBlogEntry,CodeBlogDemo
class CodeAdmin(admin.ModelAdmin):
list_display = ('name', 'date_created', 'status')
@@ -176,6 +176,22 @@ class CodeAdmin(admin.ModelAdmin):
(None, {'fields': ('name','date_created','slug','status','body_html')}),
)
+class CodeBlogEntryAdmin(admin.ModelAdmin):
+ list_display = ('title', 'pub_date', 'status')
+ search_fields = ['name','body_markdown']
+ list_filter = ['status',]
+ prepopulated_fields = {"slug" : ('title',)}
+ fieldsets = (
+ (None, {'fields': ('title','body_markdown','pub_date','slug','status','enable_comments')}),
+ )
+
+class CodeBlogDemoAdmin(admin.ModelAdmin):
+ list_display = ('title', 'pub_date', )
+ search_fields = ['name','body']
+ fieldsets = (
+ (None, {'fields': ('title','slug','template','head','body')}),
+ )
+
class AnimatedGifAdmin(admin.ModelAdmin):
list_display = ('title', 'date_created')
search_fields = ['title',]
@@ -185,6 +201,8 @@ class AnimatedGifAdmin(admin.ModelAdmin):
admin.site.register(AnimatedGif, AnimatedGifAdmin)
+admin.site.register(CodeBlogEntry, CodeBlogEntryAdmin)
+admin.site.register(CodeBlogDemo, CodeBlogDemoAdmin)
admin.site.register(Code, CodeAdmin)
admin.site.register(Project, ProjectAdmin)
admin.site.register(FiveBy, FiveByAdmin)