# 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?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to