On Aug 1, 11:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >From the documentation: > > "A ValuesQuerySet is useful when you know you're only going to need > values from a small number of the available fields and you won't need > the functionality of a model instance object. It's more efficient to > select only the fields you need to use."
Of course, but efficient means sometimes not easy code for the dev, that's why I prefer not to use this > > But, I still need an answer to my original question... does this work ? <ul> {% for book in books %} <li><a href="/books/{{ book.title }}">{{ book.title }}</a> // I prefer use names instead of ids in urls because it's more human friendly // and search engine friendly you may have to sanitize the thing with some filter // whatever you should use permalink: // http://www.djangoproject.com/documentation/model-api/#the-permalink-d... <ul> {% for author in book.authors.all %} // author is an Model not a Field <li>{{ author.first_name }}</li> <li>{{ author.last_name }}</li> etc... {% endfor %} </ul> </li> {% endfor %} </ul> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---