Hi, I am well used to working with Django, however I am stuck on a basic issue at present if anyone can spread some light. Note I have no compile errors and it runs fine. I have put in a variable "result" to check the value of form.is_valid() which is showing as always True. I have tried everyting initially thinking it was my Ubuntu dev environment but I ran it on debian etch with django version 1.0.3 and got the same thing. Any help greatly appreciated. Thanks Andrew
Here is the scenario.... I am doing a simple registration form... I have a form... as you can see I have "required=True" on the username to test validation class RegistrationForm(forms.Form): username = forms.CharField(required=True), email = forms.EmailField(required=True), password1 = forms.CharField(required=True), password2 = forms.CharField(required=True), I have a pattern in my url.py as you do... (r'^register/$','myproject.views.register'), I have a method in my view that takes the post... def register(request): if request.user.is_authenticated(): return HttpResponseRedirect("/") result = "" if request.method == 'POST': form = RegistrationForm(request.POST) if form.is_valid(): result = True else: result = False else: form = RegistrationForm() form = RegistrationForm() return render_to_response('pages/account/account.html', {'form': form,'result':result,}) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---