comment admin

This commit is contained in:
bkfox
2020-05-30 15:49:13 +02:00
parent e136218532
commit f8245d0b05
4 changed files with 17 additions and 60 deletions

View File

@ -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

View File

@ -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 = {
#