Nikolaus Schlemm a écrit :
> hi,
> 
> try something like the following:
> 
>>         {% if latest_posts %}
>>                 {% for post in latest_posts %}
>>                         <h2 id="post-{{ post.id }}">
>>                                 <a href="">{{ post.title }}</a>
>>                         </h2>
>>                         <p class="post-info">publié le {{
>> post.pub_date|date:"l d F Y à H:i" }}, dans la catégorie
> 
> {% for category in  post.category.all %}
>       <a href="{{ category.get_absolute_url }}">{{ category.title }}</a>
> {% endfor %}

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 %}

Nicolas


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