Ty
unread,Oct 17, 2008, 3:21:43 PM10/17/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
# admin.py:
from django.contrib import admin
from clydefrog.blog.models import Post, Comment
class PostAdmin(admin.ModelAdmin):
list_display = ('name', 'slug', 'date', 'is_published',)
list_filter = ('is_published',)
ordering = ('is_published', '-date', 'name',)
search_fields = ['name', 'raw_body',]
class CommentAdmin(admin.ModelAdmin):
list_display = ('name', 'email', 'website', 'date', 'approved',
'is_admin',)
list_filter = ('approved', 'is_admin',)
ordering = ('-date','name',)
search_fields = ['raw_body','name','email','website',]
admin.site.register(Post, PostAdmin)
admin.site.register(Comment, CommentAdmin)
------------------------------------------------------------------
Hey everyone. This is working perfectly for me, however I'd like to
display what post each comment belongs to in the comment
administration list.
I've tried something like this but I can't get anything working:
list_display = ('Post.name', 'name', 'email', 'website', 'date',
'approved', 'is_admin',)
Is this currently possible?