Show More
@@ -25,7 +25,12 b' class ThreadAdmin(admin.ModelAdmin):' | |||||
25 | list_filter = ('bump_time', 'archived') |
|
25 | list_filter = ('bump_time', 'archived') | |
26 | search_fields = ('id', 'title') |
|
26 | search_fields = ('id', 'title') | |
27 |
|
27 | |||
|
28 | class BanAdmin(admin.ModelAdmin): | |||
|
29 | list_display = ('ip', 'can_read') | |||
|
30 | list_filter = ('can_read',) | |||
|
31 | search_fields = ('ip',) | |||
|
32 | ||||
28 | admin.site.register(Post, PostAdmin) |
|
33 | admin.site.register(Post, PostAdmin) | |
29 | admin.site.register(Tag, TagAdmin) |
|
34 | admin.site.register(Tag, TagAdmin) | |
30 | admin.site.register(Ban) |
|
35 | admin.site.register(Ban, BanAdmin) | |
31 | admin.site.register(Thread, ThreadAdmin) |
|
36 | admin.site.register(Thread, ThreadAdmin) |
@@ -16,5 +16,5 b' class Ban(models.Model):' | |||||
16 | max_length=BAN_REASON_MAX_LENGTH) |
|
16 | max_length=BAN_REASON_MAX_LENGTH) | |
17 | can_read = models.BooleanField(default=True) |
|
17 | can_read = models.BooleanField(default=True) | |
18 |
|
18 | |||
19 |
def __ |
|
19 | def __str__(self): | |
20 | return self.ip |
|
20 | return self.ip |
General Comments 0
You need to be logged in to leave comments.
Login now