mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	| @@ -6,12 +6,10 @@ from __future__ import unicode_literals | |||||||
|  |  | ||||||
| import copy | import copy | ||||||
| from itertools import chain | from itertools import chain | ||||||
| import warnings |  | ||||||
|  |  | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
| from django.forms.utils import flatatt, to_current_timezone | from django.forms.utils import flatatt, to_current_timezone | ||||||
| from django.utils.datastructures import MultiValueDict, MergeDict | from django.utils.datastructures import MultiValueDict, MergeDict | ||||||
| from django.utils.deprecation import RemovedInDjango18Warning |  | ||||||
| from django.utils.encoding import force_text, python_2_unicode_compatible | from django.utils.encoding import force_text, python_2_unicode_compatible | ||||||
| from django.utils.html import conditional_escape, format_html | from django.utils.html import conditional_escape, format_html | ||||||
| from django.utils.translation import ugettext_lazy | from django.utils.translation import ugettext_lazy | ||||||
| @@ -187,14 +185,6 @@ class Widget(six.with_metaclass(MediaDefiningClass)): | |||||||
|     def is_hidden(self): |     def is_hidden(self): | ||||||
|         return self.input_type == 'hidden' if hasattr(self, 'input_type') else False |         return self.input_type == 'hidden' if hasattr(self, 'input_type') else False | ||||||
|  |  | ||||||
|     @is_hidden.setter |  | ||||||
|     def is_hidden(self, *args): |  | ||||||
|         warnings.warn( |  | ||||||
|             "`is_hidden` property is now read-only (and checks `input_type`). " |  | ||||||
|             "Please update your code.", |  | ||||||
|             RemovedInDjango18Warning, stacklevel=2 |  | ||||||
|         ) |  | ||||||
|  |  | ||||||
|     def subwidgets(self, name, value, attrs=None, choices=()): |     def subwidgets(self, name, value, attrs=None, choices=()): | ||||||
|         """ |         """ | ||||||
|         Yields all "subwidgets" of this widget. Used only by RadioSelect to |         Yields all "subwidgets" of this widget. Used only by RadioSelect to | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user