I guess you question is how you tell the view to use your template right ?!
Im not a pro myself but here is how i understand it:
You need to return a rendered response in your view.
Now you can directly refer to your template like this:
return direct_to_template(request,'xxx.html')
or if you need to pass parameters to your template u can do this:
return render_to_response('xxx.html', {'para1': value,}
,context_instance=RequestContext(request))
I'm not sure if you need the context_instance part though.
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT Developer
LexisNexis
Marxergasse 25, 1030 Wien
mailto:[email protected]
Tel.: 00431 534521573
Fax: +43 (1) 534 52 - 146
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Showket Bhat
Gesendet: Montag, 25. Juli 2011 14:21
An: Django users
Betreff: Re: __init__() got an unexpected keyword argument 'city'
Yes U are right.. Now sir how would i link the template with view.py..
Inface i am doing what i am reading from my python book )definitive
Guide).. but I think I am trying to do hurry... is it ?
--
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.
--
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.