Ticket #3268: choices.diff
File choices.diff, 837 bytes (added by , 18 years ago) |
---|
-
contrib/admin/options.py
237 237 else: 238 238 # Wrap the widget's render() method with a method that adds 239 239 # extra HTML to the end of the rendered output. 240 240 formfield = db_field.formfield(**kwargs) 241 241 formfield.widget.render = widgets.RelatedFieldWidgetWrapper(formfield.widget.render, db_field.rel) 242 242 return formfield 243 243 244 if db_field._choices: 245 kwargs['widget'] = forms.widgets.Select(choices=db_field._choices) 246 244 247 # For any other type of field, just call its formfield() method. 245 248 return db_field.formfield(**kwargs)