Exception Type: KeyError
my views.py is
def main_page(request):
if request.method == 'POST':
form = RegistrationForm(request.POST)
if form.is_valid():
register = Register(
name = form.cleaned_data['name'],
email = form.cleaned_data['email'],
address = form.cleaned_data['address'],
phonenumber = form.cleaned_data['phonenumber'],
country = form.cleaned_data['country'],
state = form.cleaned_data['state'],
)
register.save()
return HttpResponseRedirect('/main_page')
else:
form = RegistrationForm()
variables = RequestContext(request, {
'form' : form
})
return render_to_response('main.html', variables)
i get key error
Exception Type: KeyError
Exception Value: name
How to solve
--
success is never final failure is never fatal
have a good day
SUDHARSH
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc