I've figured a way that I think will work best for me for the model
and form but I'm having trouble with writing the view.  Here is my
pseudo code

models.py
-------------------------
class baseModel(models.Model):
    first_name   = models.CharField( max_length=100,
verbose_name='first')

class form1Model( baseModel):
    pass

class form2Model( baseModel):
    pass
-------------------------


forms.py
-------------------------
class baseForm(ModelForm):
    ....

class form1( baseForm ):
    class Meta(baseForm.Meta):
        model = models.form1Model

class form2( baseForm ):
    class Meta(baseForm.Meta):
        model = models.form2Model

-------------------------


view.py
-------------------------
def form1View(request):

    if request.method == 'POST':
        form = form1(request.POST)

        if form.is_valid():
            form.save()

            return HttpResponseRedirect('/thanksForm1/')

    else:
            form = form1()


    return render_to_response('form_template.html', {'form': form} )

-------------------------

I'm not sure how to create a view that can be reused.  The only
difference is the form name and the 'thank you' page.  I thought about
a Decorators but it doesn't seem like that is the right tool to use.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to