class DivErrorList(ErrorList):
def __unicode__(self):
return ''.join([u'%s' % e for e in self])
def register(request):
if request.method == 'POST':
form = RegistrationForm(request.POST,error_class=DivErrorList)
if form.is_valid():
return HttpResponseRedirect('/profile/')
else:
return render_to_response('registration/registration.html',{'form':form})
else:
return HttpResponseRedirect('/profile/')