Hi all, I have three forms and none of these forms pass is_valid() test when I test in intrepeter. kindly help for point out what's problem with my forms. thank you.
from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django import forms from django.forms import ModelForm #1st class RegistrationForm(UserCreationForm): email = forms.EmailField(label=("e-mail")) class Meta: model = User fields = ('username', 'email','password2') def clean_email(self): email = self.cleaned_data["email"] try: User.objects.get(email=email) except User.DoesNotExist: return email raise forms.ValidationError(("e-mail already exist.")) #2nd class UserProfileForm(ModelForm): class Meta : model = User fields = ('email',) #3rd class DeleteForm(ModelForm): class Meta : model = User fields = ('username',) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---