last day (14 days later) » 

3:18 PM
1
A: Simple List of Links in Django Blog

cdvv7788You are sending your friends to your template, now you have to render it. You can check the documentation. It should be something like this in your html: {% for friend in friends %} <a href="{{ friend.link }}">{{ friend.title }}</a> {% endfor %}

 
actually i did include the for loop and variable friend in my home.html. but the list did not appear. let me update my question.
 
Try with friends instead of friends.object_list
 
ah yes it works! fantastic! thanks!
why does it not work with object_list though?
 
I don't know of object_list...can you link me the source where you found it???
 
docs.djangoproject.com/en/1.3/topics/generic-views ----> maybe it's only for generic views?
 
3:18 PM
Thats for generics views in django 1.3. If you are starting a new project make sure to use the latest django version (1.7 at this moment). If you want to use generic views, use updated documentation (bottom right and select 1.7). Generic views have changed a lot since 1.3.
 
i see. thank you. btw, do you of good documentation for generic views, class based views? i can't find any good tutorials that explain it... much appreciated!
 
Read the documentation
it is pretty good
just take your time to understand the examples
as a hint i would advise not to try to force generic views to do more than what they should...they are quite limited and trying to add them more functionalities than what they are intended for can be a pain
 
Hi
I see.. Thanks for your advice
When i read the documentation i hardly understand because i am new to programming
and when i see things like context or render_to_response and the arguments within it
i get pretty lost
 

last day (14 days later) »