mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #3506 -- Changed newforms BoundField.help_text to an empty string if None. Thanks for the patch, Thomas Steinacher
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -218,7 +218,7 @@ class BoundField(StrAndUnicode): | |||||||
|             self.label = pretty_name(name) |             self.label = pretty_name(name) | ||||||
|         else: |         else: | ||||||
|             self.label = self.field.label |             self.label = self.field.label | ||||||
|         self.help_text = field.help_text |         self.help_text = field.help_text or '' | ||||||
|  |  | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|         "Renders this field as an HTML widget." |         "Renders this field as an HTML widget." | ||||||
|   | |||||||
| @@ -3044,6 +3044,8 @@ does not have help text, nothing will be output. | |||||||
| <p>Password2: <input type="password" name="password2" /></p> | <p>Password2: <input type="password" name="password2" /></p> | ||||||
| <input type="submit" /> | <input type="submit" /> | ||||||
| </form> | </form> | ||||||
|  | >>> Template('{{ form.password1.help_text }}').render(Context({'form': UserRegistration(auto_id=False)})) | ||||||
|  | '' | ||||||
|  |  | ||||||
| The label_tag() method takes an optional attrs argument: a dictionary of HTML | The label_tag() method takes an optional attrs argument: a dictionary of HTML | ||||||
| attributes to add to the <label> tag. | attributes to add to the <label> tag. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user