from django.contrib import admin from bn_django.journal.models import * class EntryAdmin(admin.ModelAdmin): #fieldsets = ( #(None, { #'fields': ('title', 'date', 'html_content', 'author', 'subjournal') #}, ), ##('Advanced options', { #'classes': ('collapse',), #'fields': ('slug',)})) #prepopulated_fields = {'slug': ('title'),'text_content': ('html_content')} #date_hierarchy = 'date' #list_display = ('date', 'title', 'subjournal', 'author') search_fields = ('title','text_content') class MicroEntryAdmin(admin.ModelAdmin): #fieldsets = ( #(None, { #'fields': ('title', 'date', 'html_content', 'author', #'subjournal',), }), #('Advanced options', { #'classes': ('collapse',), #'fields': ('slug',)})) prepopulated_fields = {'slug': ('title'),'text_content': ('html_content')} date_hierarchy = 'date' list_display = ('date', 'title', 'subjournal', 'author') search_fields = ('title','text_content') class SubJournalAdmin(admin.ModelAdmin): pass class LinkArtifactAdmin(admin.ModelAdmin): pass class CodeAdmin(admin.ModelAdmin): pass class VideoAdmin(admin.ModelAdmin): pass class ImageAdmin(admin.ModelAdmin): pass admin.site.register(Entry,EntryAdmin) admin.site.register(MicroEntry,EntryAdmin) admin.site.register(SubJournal) admin.site.register(LinkArtifact) admin.site.register(CodeArtifact) admin.site.register(VideoArtifact) admin.site.register(ImageArtifact)