Another question about forms. So the form name or names that I pass in the dictionary to the response can also be named anything and aren't required to be of a specific form name format right?
On Jan 7, 9:57 am, hank23 <hversem...@stchas.edu> wrote: > I see. So then I would code it something like this then: > > return render_to_response('contact.html', > { my_data_dictionary(including an entry for 'form': form) }, > context_instance=RequestContext(request)) > > On Jan 7, 9:42 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > > > > > On Friday, January 7, 2011 3:38:10 PM UTC, hank23 wrote: > > > > So then when using a form do I code it something like this then: > > > > return render_to_response('contact.html', { > > > 'form': form, > > > my_data_dictionary, > > > context_instance=RequestContext(request)) > > > > }) > > > > I ask because it's confusing me when using a form for how to code the > > > form reference while still including the dictionary and context > > > references. The dictionary reference almost seems redundant since when > > > I go to create my form and assign it the name form I use the data > > > dictionary in the constructor of my form. Please clarify. > > > No, for some reason you're thinking of the form as something special. It's > > not - it's simply part of the context, just like anything else you pass to > > the template. So the form just goes inside `my_data_dictionary` along with > > any other data you want there. > > -- > > DR.- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- 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.