1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
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)
|