Hi there ! I try to understand why my form doesn't render anything. No exception is raised and i'm going crazy ! In my forms.py I got these (simplified for instance) classes :
class SignupPasswordWidget(forms.MultiWidget): def __init__(self, attrs=None): widgets = ( forms.PasswordInput(attrs={'class': 'first-password'}), forms.PasswordInput(attrs={'class': 'second-password'}) ) super(SignupPasswordWidget, self).__init__(widgets, attrs) def decompress(self, value): return value class SignupPasswordField(forms.MultiValueField): widget = SignupPasswordWidget def compress(self, data_list): return data_list def clean(self, value): if len(value[0]) is 0: raise forms.ValidationError(_(u"Vous devez spĂ©cifier votre mot de passe")) elif len(value[1]) is 0: raise forms.ValidationError(_(u"Vous devez confirmer votre mot de passe")) if not value[0] == value[1]: raise forms.ValidationError(_(u"Votre mot de passe et sa confirmation doivent ĂȘtre identiques")) return value[0] class SignupForm(forms.Form): password = SignupPasswordField(label=_(u"Mot de passe")) In my template I just put "form.as_table()". If I remove "widget = SignupPasswordWidget" in "SignupPasswordField", I show my (single) password field. What am I doing wrong ?? Why don't I get an Exception ? I tried many things like implement format_output or render methods, but I still get nothing. Please help !!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---