Re: Displaying ManyToMany relation in template

2006-11-06 Thread Nicolas Steinmetz
Nicolas Steinmetz wrote: > In my views.py, do I need to set/declare anything about this ? > > If I just add the previous piece of code, I have a template error with > this line highlighted - I do not have it with me :-/ : > {% for category in post.category.all %} ok my fault, I already had som

Re: Displaying ManyToMany relation in template

2006-11-06 Thread Nicolas Steinmetz
Nikolaus Schlemm a écrit : > hi, > > try something like the following: > >> {% if latest_posts %} >> {% for post in latest_posts %} >> >> {{ post.title }} >> >> publi

Re: Displaying ManyToMany relation in template

2006-11-02 Thread Nicolas Steinmetz
Nikolaus Schlemm a écrit : > {% for category in post.category.all %} > {{ category.title }} > {% endfor %} > [...] > -> http://www.djangoproject.com/documentation/models/many_to_many/ Indeed, I was looking for template code and did not look at the output of the shell ;-) I'll test all

Re: Displaying ManyToMany relation in template

2006-10-31 Thread Nikolaus Schlemm
hi, try something like the following: > {% if latest_posts %} > {% for post in latest_posts %} > > {{ post.title }} > > publié le {{ > post.pub_date|date:"l d F Y à H