On Nov 29, 2:45 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:

>         user.edition_set.order_by('rating__rating')
>
> will do what you want.
>

Yes! It does!
What an amazing timesaver that small line was :-)

Is it possible to actually access the rating directly from the
template?
In the view:
editions =  user.edition_set.order_by('rating__rating')

In the template:
{% for e in editions %}
    <h1>{{ e.title }}</h1>
    Your own personal rating: {{ e.rating.rating }} <-- this obviously
won't work.
{% endfor %}





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