Ticket #10774: form_media_key_access.patch
File form_media_key_access.patch, 569 bytes (added by , 16 years ago) |
---|
-
django/forms/widgets.py
75 75 def __getitem__(self, name): 76 76 "Returns a Media object that only contains media of the given type" 77 77 if name in MEDIA_TYPES: 78 return Media(**{ name: getattr(self, '_' + name)})78 return Media(**{str(name): getattr(self, '_' + name)}) 79 79 raise KeyError('Unknown media type "%s"' % name) 80 80 81 81 def add_js(self, data):