##// END OF EJS Templates
Added 'primary' parameter for the key to indicate this key would be used in...
Added 'primary' parameter for the key to indicate this key would be used in ID. Other keys will be used for signing only and can be shared.

File last commit:

r740:7c2d35f4 2.0-dev
r796:6e2f495a decentral
Show More
admin.py
31 lines | 779 B | text/x-python | PythonLexer
from django.contrib import admin
from boards.models import Post, Tag, Ban, Thread
class PostAdmin(admin.ModelAdmin):
list_display = ('id', 'title', 'text')
list_filter = ('pub_time', 'thread_new')
search_fields = ('id', 'title', 'text')
class TagAdmin(admin.ModelAdmin):
list_display = ('name',)
class ThreadAdmin(admin.ModelAdmin):
def title(self, obj):
return obj.get_opening_post().title
def reply_count(self, obj):
return obj.get_reply_count()
list_display = ('id', 'title', 'reply_count', 'archived')
list_filter = ('bump_time', 'archived')
search_fields = ('id', 'title')
admin.site.register(Post, PostAdmin)
admin.site.register(Tag, TagAdmin)
admin.site.register(Ban)
admin.site.register(Thread, ThreadAdmin)