The template wants a dictionary of key-value pairs, and you called
that dict 'variables' in your code.
So you need to define a variable called variables that holds the data
to pass to the template. Example:
variables = {'foo':'bar', 'a':3}
return render_to_response('survey.html', variables)


Now your template can print the value of foo and a using {{ foo }} and
{{ a }}



On Sep 8, 9:26 pm, putih <[email protected]> wrote:
> then how to define the variables..??
>
> On Sep 8, 11:35 pm, Kenneth Gonsalves <[email protected]> wrote:
>
> > On Wednesday 09 Sep 2009 7:50:36 am putih wrote:
>
> > > here is my code :-
> > > @login_required
> > > def survey(request):
> > >   return render_to_response('survey.html', variables)
>
> > > please help me because this is my first time using django..
> > > really need your help guys..
>
> > you have not defined your variables.
> > --
> > regards
> > kghttp://lawgon.livejournal.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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