  
  # Some ideas for using templates with forms ###################################
  
  >>> class UserRegistration(Form):
  ...    username = CharField(max_length=10)
  ...    password1 = CharField(widget=PasswordInput)
  ...    password2 = CharField(widget=PasswordInput)
  ...    def clean(self):
  ...        if self.clean_data.get('password1') and self.clean_data.get('password2') and self.clean_data['password1'] != self.clean_data['password2']:
  ...            raise ValidationError(u'Please make sure your passwords match.')
 
</s>
...    username = CharField(max_length=10, help_text="Good luck picking a username that doesn't already exist.")
  
  # Some ideas for using templates with forms ###################################
  
  >>> class UserRegistration(Form):
...    username = CharField(max_length=10, help_text="Good luck picking a username that doesn't already exist.")
  ...    password1 = CharField(widget=PasswordInput)
  ...    password2 = CharField(widget=PasswordInput)
  ...    def clean(self):
  ...        if self.clean_data.get('password1') and self.clean_data.get('password2') and self.clean_data['password1'] != self.clean_data['password2']:
  ...            raise ValidationError(u'Please make sure your passwords match.')
keep keep keep keep replace keep keep keep keep keep
 Fixed #3456 -- Made it easier/more intuitive to render newforms help_text in templates

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
tests/regressiontests/forms/tests.py