forked from rc/aircox
comment admin
This commit is contained in:
@ -100,6 +100,8 @@ class StaticPageAdmin(BasePageAdmin):
|
||||
@admin.register(Comment)
|
||||
class CommentAdmin(admin.ModelAdmin):
|
||||
list_display = ('page_title', 'date', 'nickname')
|
||||
list_filter = ('date',)
|
||||
search_fields = ('page__title', 'nickname')
|
||||
|
||||
def page_title(self, obj):
|
||||
return obj.page.title
|
||||
|
@ -5,11 +5,19 @@ from django.conf import settings
|
||||
|
||||
|
||||
#class BaseSettings:
|
||||
# deprecated = set()
|
||||
#
|
||||
# def __init__(self, user_conf):
|
||||
# if user_conf:
|
||||
# for key, value in user_conf.items():
|
||||
# if not hasattr(self, key):
|
||||
# if key in self.deprecated:
|
||||
# raise ValueError('"{}" config is deprecated'.format(key))
|
||||
# else:
|
||||
# raise ValueError('"{}" is not a config value'.format(key))
|
||||
# setattr(self, key, value)
|
||||
#
|
||||
#
|
||||
#class Settings(BaseSettings):
|
||||
# default_user_groups = {
|
||||
#
|
||||
|
Reference in New Issue
Block a user