diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py
index 884171b..5c6353b 100644
a
|
b
|
class AdminDateWidget(forms.TextInput):
|
39 | 39 | js = (settings.ADMIN_MEDIA_PREFIX + "js/calendar.js", |
40 | 40 | settings.ADMIN_MEDIA_PREFIX + "js/admin/DateTimeShortcuts.js") |
41 | 41 | |
42 | | def __init__(self, attrs={}): |
| 42 | def __init__(self, attrs=None): |
43 | 43 | super(AdminDateWidget, self).__init__(attrs={'class': 'vDateField', 'size': '10'}) |
44 | 44 | |
45 | 45 | class AdminTimeWidget(forms.TextInput): |
… |
… |
class AdminTimeWidget(forms.TextInput):
|
47 | 47 | js = (settings.ADMIN_MEDIA_PREFIX + "js/calendar.js", |
48 | 48 | settings.ADMIN_MEDIA_PREFIX + "js/admin/DateTimeShortcuts.js") |
49 | 49 | |
50 | | def __init__(self, attrs={}): |
| 50 | def __init__(self, attrs=None): |
51 | 51 | super(AdminTimeWidget, self).__init__(attrs={'class': 'vTimeField', 'size': '8'}) |
52 | 52 | |
53 | 53 | class AdminSplitDateTime(forms.SplitDateTimeWidget): |
… |
… |
class AdminFileWidget(forms.FileInput):
|
79 | 79 | """ |
80 | 80 | A FileField Widget that shows its current value if it has one. |
81 | 81 | """ |
82 | | def __init__(self, attrs={}): |
| 82 | def __init__(self, attrs=None): |
83 | 83 | super(AdminFileWidget, self).__init__(attrs) |
84 | 84 | |
85 | 85 | def render(self, name, value, attrs=None): |
… |
… |
class RelatedFieldWidgetWrapper(forms.Widget):
|
210 | 210 | return self.widget.id_for_label(id_) |
211 | 211 | |
212 | 212 | class AdminTextareaWidget(forms.Textarea): |
213 | | def __init__(self, attrs={}): |
214 | | super(AdminTextareaWidget, self).__init__(attrs={'class': 'vLargeTextField'}) |
| 213 | def __init__(self, attrs=None): |
| 214 | if attrs is None: |
| 215 | attrs = {} |
| 216 | super(AdminTextareaWidget, self).__init__(attrs=attrs.update({'class': 'vLargeTextField'})) |
215 | 217 | |
216 | 218 | class AdminTextInputWidget(forms.TextInput): |
217 | | def __init__(self, attrs={}): |
218 | | super(AdminTextInputWidget, self).__init__(attrs={'class': 'vTextField'}) |
| 219 | def __init__(self, attrs=None): |
| 220 | if attrs is None: |
| 221 | attrs = {} |
| 222 | super(AdminTextInputWidget, self).__init__(attrs=attrs.update({'class': 'vTextField'})) |
219 | 223 | |
220 | 224 | class AdminURLFieldWidget(forms.TextInput): |
221 | | def __init__(self, attrs={}): |
222 | | super(AdminURLFieldWidget, self).__init__(attrs={'class': 'vURLField'}) |
| 225 | def __init__(self, attrs=None): |
| 226 | if attrs is None: |
| 227 | attrs = {} |
| 228 | super(AdminURLFieldWidget, self).__init__(attrs=attrs.update({'class': 'vURLField'})) |
223 | 229 | |
224 | 230 | class AdminIntegerFieldWidget(forms.TextInput): |
225 | | def __init__(self, attrs={}): |
226 | | super(AdminIntegerFieldWidget, self).__init__(attrs={'class': 'vIntegerField'}) |
227 | | No newline at end of file |
| 231 | def __init__(self, attrs=None): |
| 232 | if attrs is None: |
| 233 | attrs = {} |
| 234 | super(AdminIntegerFieldWidget, self).__init__(attrs=attrs.update({'class': 'vIntegerField'})) |