from django.shortcuts import render_to_responsefrom django import formsfrom django.http import HttpResponseclass UserForm(forms.Form): name = forms.CharField()def register(req): if req.method == 'POST': form_object = UserForm(req.POST) if form_object.is_valid(): print form_object.cleaned_data return HttpResponse('ok') else: form_object = UserForm() return render_to_response('index.html',{'form':form_object}) templates/index.html