Thursday, October 13, 2011

Re: Please help to get templates working at all

> Your view doesn't seem to have anything at all to do with your template. The
> only thing you pass to the template context is a form, which isn't mentioned
> at all in the template, and you don't pass the only variable which is used
> on the template, which is "campaigns".

Yeah, you are great, now I see what I wanted.

> Are you sure you've posted the correct view? I would expect something like
> this:
>
>     def campaigns(request):
>         ctx = {'campaigns': Campaign.objects.all()}
>         return render_to_response("campaigns.html", ctx,
> context_instance=RequestContext(request))

This is exactly what I missed.

Thanks a lot and merry Christmas.

Piotr Hosowicz

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate