Show More
@@ -1,7 +1,23 b'' | |||
|
1 | 1 | from django.contrib import admin |
|
2 | 2 | from boards.models import Post, Tag, User, Ban |
|
3 | 3 | |
|
4 | admin.site.register(Post) | |
|
5 | admin.site.register(Tag) | |
|
6 | admin.site.register(User) | |
|
4 | class PostAdmin(admin.ModelAdmin): | |
|
5 | ||
|
6 | list_display = ('id', 'title', 'text') | |
|
7 | list_filter = ('pub_time', 'poster_ip', 'tags') | |
|
8 | search_fields = ('id', 'title', 'text') | |
|
9 | ||
|
10 | class TagAdmin(admin.ModelAdmin): | |
|
11 | ||
|
12 | list_display = ('name', 'linked') | |
|
13 | list_filter = ('linked',) | |
|
14 | ||
|
15 | ||
|
16 | class UserAdmin(admin.ModelAdmin): | |
|
17 | ||
|
18 | list_display = ('user_id', 'rank') | |
|
19 | ||
|
20 | admin.site.register(Post, PostAdmin) | |
|
21 | admin.site.register(Tag, TagAdmin) | |
|
22 | admin.site.register(User, UserAdmin) | |
|
7 | 23 | admin.site.register(Ban) |
General Comments 0
You need to be logged in to leave comments.
Login now