Hi,

> still, it's not exactly clear to me why the admin does not work the same as
> other templates.

The Admin is not a template. So, I don't know what you mean by that.

>
> in my own template, it is no problem to refer to comments of a post using,
> e.g.
>
> {% for comment in post.comments.all %}
>     [...]
> {% endfor %}
>
> or
>
> {{ post.comments.all|length }}
>
> looks inconsistent to me.

The whole point is that in your own template, you decide whether you
want to display the count of comments or a list of comments or the
names of the commenters, and so on. How would the Admin know what you
want if you were allowed to put "comments" in the list_display? One
user may want the count, another may want something else. That's why
the Admin supports calling methods in your model class. And through
such methods you are able to display your comments field exactly the
way you want.

-Rajesh D


--~--~---------~--~----~------------~-------~--~----~
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