diff options
Diffstat (limited to 'django/contrib/comments/models.py')
| -rw-r--r-- | django/contrib/comments/models.py | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py index f1a0bc5f48..a13fec9e6e 100644 --- a/django/contrib/comments/models.py +++ b/django/contrib/comments/models.py @@ -283,36 +283,4 @@ class ModeratorDeletion(models.Model): def __unicode__(self): return _("Moderator deletion by %r") % self.user - -# Register the admin options for these models. -# TODO: Maybe this should live in a separate module admin.py, but how would we -# ensure that module was loaded? - -from django.contrib import admin - -class CommentAdmin(admin.ModelAdmin): - fieldsets = ( - (None, {'fields': ('content_type', 'object_id', 'site')}), - ('Content', {'fields': ('user', 'headline', 'comment')}), - ('Ratings', {'fields': ('rating1', 'rating2', 'rating3', 'rating4', 'rating5', 'rating6', 'rating7', 'rating8', 'valid_rating')}), - ('Meta', {'fields': ('is_public', 'is_removed', 'ip_address')}), - ) - list_display = ('user', 'submit_date', 'content_type', 'get_content_object') - list_filter = ('submit_date',) - date_hierarchy = 'submit_date' - search_fields = ('comment', 'user__username') - raw_id_fields = ('user',) - -class FreeCommentAdmin(admin.ModelAdmin): - fieldsets = ( - (None, {'fields': ('content_type', 'object_id', 'site')}), - ('Content', {'fields': ('person_name', 'comment')}), - ('Meta', {'fields': ('is_public', 'ip_address', 'approved')}), - ) - list_display = ('person_name', 'submit_date', 'content_type', 'get_content_object') - list_filter = ('submit_date',) - date_hierarchy = 'submit_date' - search_fields = ('comment', 'person_name') - -admin.site.register(Comment, CommentAdmin) -admin.site.register(FreeComment, FreeCommentAdmin) +
\ No newline at end of file |
