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
Nikolaus Schlemm a écrit :
> hi,
>
> try something like the following:
>
>> {% if latest_posts %}
>> {% for post in latest_posts %}
>>
>> {{ post.title }}
>>
>> publi
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
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
4 matches
Mail list logo