On Mar 23, 5:32 pm, Pep <pepourqu...@gmail.com> wrote:
> Well, following the doc, this code works :
>
> {% get_comment_list for myModule.News 1 as comment_list %}
>
> But  I don't want to have to write the object_id in my template !
>
>    def index(request, name, cp):
>     news_content = News.objects.order_by('id')
>     return render_to_response('index.html', {
>         'title' : 'news_content.title';
>         ...
>         })
>
> PEP

You don't need to, but you *do* obviously need to pass something to
identify the object. It would be easier if rather than passing
individual variables for title and so on, you could just pass the
news_content variable, and then you'd be able to do
{{ news_content.title }} in the template - *and* use the news_content
object as the parameter for the {% get_comment_list %} tag.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to