Changeset 7953
- Timestamp:
- 07/18/08 15:23:02 (4 months ago)
- Files:
-
- django/branches/newforms-admin/django/contrib/auth/models.py (modified) (1 diff)
- django/branches/newforms-admin/django/contrib/comments/admin.py (added)
- django/branches/newforms-admin/django/contrib/comments/models.py (modified) (1 diff)
- django/branches/newforms-admin/django/contrib/flatpages/admin.py (added)
- django/branches/newforms-admin/django/contrib/flatpages/models.py (modified) (1 diff)
- django/branches/newforms-admin/django/contrib/sites/admin.py (added)
- django/branches/newforms-admin/django/contrib/sites/models.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin/django/contrib/auth/models.py
r7809 r7953 370 370 def is_authenticated(self): 371 371 return False 372 373 # Register the admin options for these models.374 from django.contrib.auth import admindjango/branches/newforms-admin/django/contrib/comments/models.py
r7211 r7953 284 284 def __unicode__(self): 285 285 return _("Moderator deletion by %r") % self.user 286 287 # Register the admin options for these models. 288 # TODO: Maybe this should live in a separate module admin.py, but how would we 289 # ensure that module was loaded? 290 291 from django.contrib import admin 292 293 class CommentAdmin(admin.ModelAdmin): 294 fieldsets = ( 295 (None, {'fields': ('content_type', 'object_id', 'site')}), 296 ('Content', {'fields': ('user', 'headline', 'comment')}), 297 ('Ratings', {'fields': ('rating1', 'rating2', 'rating3', 'rating4', 'rating5', 'rating6', 'rating7', 'rating8', 'valid_rating')}), 298 ('Meta', {'fields': ('is_public', 'is_removed', 'ip_address')}), 299 ) 300 list_display = ('user', 'submit_date', 'content_type', 'get_content_object') 301 list_filter = ('submit_date',) 302 date_hierarchy = 'submit_date' 303 search_fields = ('comment', 'user__username') 304 raw_id_fields = ('user',) 305 306 class FreeCommentAdmin(admin.ModelAdmin): 307 fieldsets = ( 308 (None, {'fields': ('content_type', 'object_id', 'site')}), 309 ('Content', {'fields': ('person_name', 'comment')}), 310 ('Meta', {'fields': ('is_public', 'ip_address', 'approved')}), 311 ) 312 list_display = ('person_name', 'submit_date', 'content_type', 'get_content_object') 313 list_filter = ('submit_date',) 314 date_hierarchy = 'submit_date' 315 search_fields = ('comment', 'person_name') 316 317 admin.site.register(Comment, CommentAdmin) 318 admin.site.register(FreeComment, FreeCommentAdmin) 286 django/branches/newforms-admin/django/contrib/flatpages/models.py
r7809 r7953 27 27 def get_absolute_url(self): 28 28 return self.url 29 30 # Register the admin options for these models.31 # TODO: Maybe this should live in a separate module admin.py, but how would we32 # ensure that module was loaded?33 34 from django.contrib import admin35 36 class FlatPageAdmin(admin.ModelAdmin):37 fieldsets = (38 (None, {'fields': ('url', 'title', 'content', 'sites')}),39 (_('Advanced options'), {'classes': ('collapse',), 'fields': ('enable_comments', 'registration_required', 'template_name')}),40 )41 list_display = ('url', 'title')42 list_filter = ('sites', 'enable_comments', 'registration_required')43 search_fields = ('url', 'title')44 45 admin.site.register(FlatPage, FlatPageAdmin)django/branches/newforms-admin/django/contrib/sites/models.py
r7730 r7953 50 50 except KeyError: 51 51 pass 52 53 # Register the admin options for these models.54 # TODO: Maybe this should live in a separate module admin.py, but how would we55 # ensure that module was loaded?56 57 from django.contrib import admin58 59 class SiteAdmin(admin.ModelAdmin):60 list_display = ('domain', 'name')61 search_fields = ('domain', 'name')62 63 admin.site.register(Site, SiteAdmin)64 52 65 53 class RequestSite(object):
