I have the following forms:

from django.forms.models import ModelForm
from demo.home.models import Product, ProductDetail

class ProductForm(ModelForm):
    class Meta:
        model = Product


class ProductDetailForm(ModelForm):
    class Meta:
        model = ProductDetail


I am trying to handle the submission of these forms in a single
method.

def add_product(request):
    if not request.method == 'POST':
        form1 = ProductForm();
        form2 = ProductDetailForm()
        return render_to_response('index.html', {'form1' : form1,
'form2' : form2})
    else:
        #Need to process the forms here.



How do I know which form is submitted?


Thank you!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to