summaryrefslogtreecommitdiff
path: root/django/contrib/comments/models.py
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-07-18 20:23:02 +0000
committerBrian Rosner <brosner@gmail.com>2008-07-18 20:23:02 +0000
commitefc84a8a6348c9932a8a1bd14e7a30ba272df648 (patch)
treef9249ec82a520cb45cbcb973bc0fe5b1eb46dedb /django/contrib/comments/models.py
parentdd5197f081b6f0cac77721f24563b05005a686fb (diff)
newforms-admin: Moved contrib ModelAdmin classes to an admin.py file in their respective apps. This is allowed since [7872].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/comments/models.py')
-rw-r--r--django/contrib/comments/models.py34
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