You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
907 B
24 lines
907 B
from django.contrib import admin |
|
from django.conf import settings |
|
from django.contrib.comments.models import Comment |
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
class CommentsAdmin(admin.ModelAdmin): |
|
fieldsets = ( |
|
(None, |
|
{'fields': ('content_type', 'object_pk', 'site')} |
|
), |
|
(_('Content'), |
|
{'fields': ('user', 'user_name', 'user_email', 'user_url', 'comment')} |
|
), |
|
(_('Metadata'), |
|
{'fields': ('submit_date', 'ip_address', 'is_public', 'is_removed')} |
|
), |
|
) |
|
|
|
list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'is_public', 'is_removed') |
|
list_filter = ('submit_date', 'site', 'is_public', 'is_removed') |
|
date_hierarchy = 'submit_date' |
|
search_fields = ('comment', 'user__username', 'user_name', 'user_email', 'user_url', 'ip_address') |
|
|
|
admin.site.register(Comment, CommentsAdmin)
|
|
|