And I do that. Here is my template: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en"> <head> <title><!-- Insert your title here --></title> </head> <body> <form action="." method="POST"> <table> {{ form1.as_table }} </table>
<p><input type="submit" value="Submit"></p> </form> <form action="." method="POST"> <table> {{ form2.as_table }} </table> <p><input type="submit" value="Submit"></p> </form> </body> </html> On Nov 20, 2:15 pm, Brian Neal <[EMAIL PROTECTED]> wrote: > On Nov 20, 4:03 pm, ayayalar <[EMAIL PROTECTED]> wrote: > > > > > VIEW: > > > def add_product(request): > > if not request.method == 'POST': > > form1 = ProductForm() > > return render_to_response('index.html', {'form1' : form1}) > > else: > > form1 = ProductForm(request.POST) > > if form1.is_valid(): > > form1.save() > > return HttpResponseRedirect('/thanks.html') > > > def add_product_details(request): > > if not request.method == 'POST': > > form2 = ProductDetailForm() > > return render_to_response('index.html', {'form2' : form2}) > > else: > > if form2.is_valid(): > > form2.save() > > return HttpResponseRedirect('/thanks.html') > > > URLS > > urlpatterns = patterns('', > > > (r'^product/$', views.add_product), > > (r'^product/$', views.add_product_details), > > > Is this possible? For some reason the 2nd form never shows up > > Well you need to pass both forms to the template to get them both to > show up. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---