mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
newforms-admin: Fixed #4761 -- Moved default definition of filter_horizontal and filter_vertical so that inline edits work with M2M fields.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
20219e9fb6
commit
2a45bdf9ac
@ -118,7 +118,8 @@ class BaseModelAdmin(object):
|
|||||||
"""Functionality common to both ModelAdmin and InlineAdmin."""
|
"""Functionality common to both ModelAdmin and InlineAdmin."""
|
||||||
raw_id_fields = ()
|
raw_id_fields = ()
|
||||||
fields = None
|
fields = None
|
||||||
|
filter_vertical = ()
|
||||||
|
filter_horizontal = ()
|
||||||
def formfield_for_dbfield(self, db_field, **kwargs):
|
def formfield_for_dbfield(self, db_field, **kwargs):
|
||||||
"""
|
"""
|
||||||
Hook for specifying the form Field instance for a given database Field
|
Hook for specifying the form Field instance for a given database Field
|
||||||
@ -177,8 +178,6 @@ class ModelAdmin(BaseModelAdmin):
|
|||||||
save_on_top = False
|
save_on_top = False
|
||||||
ordering = None
|
ordering = None
|
||||||
prepopulated_fields = {}
|
prepopulated_fields = {}
|
||||||
filter_vertical = ()
|
|
||||||
filter_horizontal = ()
|
|
||||||
inlines = []
|
inlines = []
|
||||||
|
|
||||||
def __init__(self, model):
|
def __init__(self, model):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user