Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit d8411ca54d5bd0e58a53d220e510eeaf7730c92d 1 parent 7eb538f
@jkocherhans jkocherhans authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/contrib/admin/options.py
View
3  django/contrib/admin/options.py
@@ -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 @@ def __init__(self, model, name=None, extra=3, fields=None, template=None):
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'
Please sign in to comment.
Something went wrong with that request. Please try again.