mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	newforms: Simplified BoundField._errors()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -179,10 +179,7 @@ class BoundField(StrAndUnicode): | ||||
|         Returns an ErrorList for this field. Returns an empty ErrorList | ||||
|         if there are none. | ||||
|         """ | ||||
|         try: | ||||
|             return self.form.errors[self.name] | ||||
|         except KeyError: | ||||
|             return ErrorList() | ||||
|         return self.form.errors.get(self.name, ErrorList()) | ||||
|     errors = property(_errors) | ||||
|  | ||||
|     def as_widget(self, widget, attrs=None): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user