hi all

imagine you have a first model class and a second model class with a
ForeignKey referring to the first one. for example, a Post model (taken from
the tutorial blog app) and a Comment model. of course, a post can have
multiple comments, so the Post model gets an attribute 'comments' (specified
using related_name).

how can the comments be displayed in the list view of the posts using
newforms-admin? i would like to indicate whether there are comments and how
many, if any.

but when adding the 'comments' attribute to the list_display of PostOptions,
syncdb throws an exception:

*django.core.exceptions.ImproperlyConfigured: `PostOptions.list_display[13]`
refers to `comments` that is neither a field, method or property of model
`Post`.
*
which is not true! Post does get a 'comments' field by the definition of
Comment.

inlined comments do appear in the detail view, though.

what's wrong?

thanks for your help
André

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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