mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
newforms-admin: Negligible comment formatting change
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
49d25eec2c
commit
761c02288a
@ -108,7 +108,7 @@ class BaseModelAdmin(object):
|
||||
|
||||
If kwargs are given, they're passed to the form Field's constructor.
|
||||
"""
|
||||
# For ManyToManyFields with a filter interface, use a special Widget.
|
||||
# For ManyToManyFields with a filter interface, use a special widget.
|
||||
if isinstance(db_field, models.ManyToManyField) and db_field.name in (self.filter_vertical + self.filter_horizontal):
|
||||
kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in self.filter_vertical))
|
||||
return db_field.formfield(**kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user