1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

newforms-admin: Fixed #4629. Implemented raw_id_fields for inlines.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2007-06-20 06:11:28 +00:00
parent 7eb538fd46
commit d8411ca54d

View File

@ -623,7 +623,7 @@ class InlineModelAdmin(BaseModelAdmin):
``model`` to its parent. This is required if ``model`` has more than one
``ForeignKey`` to its parent.
"""
def __init__(self, model, name=None, extra=3, fields=None, template=None):
def __init__(self, model, name=None, extra=3, fields=None, template=None, raw_id_fields=None):
self.model = model
self.opts = model._meta
self.name = name
@ -633,6 +633,7 @@ class InlineModelAdmin(BaseModelAdmin):
self.verbose_name = model._meta.verbose_name
self.verbose_name_plural = model._meta.verbose_name_plural
self.prepopulated_fields = {}
self.raw_id_fields = raw_id_fields or ()
class StackedInline(InlineModelAdmin):
default_template = 'admin/edit_inline_stacked.html'