﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23904	Forms Overview	Brett	nobody	"On the forms overview, the views.py snippet:
https://docs.djangoproject.com/en/1.7/topics/forms/

from django.shortcuts import render
from django.http import HttpResponseRedirect

def get_name(request):
    # if this is a POST request we need to process the form data
    if request.method == 'POST':
        # create a form instance and populate it with data from the request:
        form = NameForm(request.POST)
        # check whether it's valid:
        if form.is_valid():
            # process the data in form.cleaned_data as required
            # ...
            # redirect to a new URL:
            return HttpResponseRedirect('/thanks/')

    # if a GET (or any other method) we'll create a blank form
    else:
        form = NameForm()

    return render(request, 'name.html', {'form': form})

If you call NameForm() #2nd to last line of code
Won't that cause an import error?

https://docs.djangoproject.com/en/1.7/topics/forms/"	Cleanup/optimization	closed	Documentation	1.7	Normal	worksforme			Unreviewed	0	0	0	0	0	0
