Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 90a160e568
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (18 sloc) 0.773 kb
from snapboard.models import *
from django.contrib import admin
class CategoryAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
class ThreadAdmin(admin.ModelAdmin):
list_display = ('user', 'name', 'category', 'sticky', 'private', 'closed')
list_filter = ('closed', 'sticky', 'category', 'private',)
search_fields = ('name',)
raw_id_fields = ('user', 'category')
class PostAdmin(admin.ModelAdmin):
list_display = ('user', 'date', 'thread', 'ip')
search_fields = ('text', 'user')
raw_id_fields = ('thread', 'user',)
admin.site.register(Category, CategoryAdmin)
admin.site.register(Post, PostAdmin)
admin.site.register(Thread, ThreadAdmin)
#admin.site.register(WatchList, WatchListAdmin)
admin.site.register(UserSettings)
Jump to Line
Something went wrong with that request. Please try again.