Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #573 -- Added 'Add another' link to many-to-many fields in admi…

…n. Thanks,

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent c1a16d5 commit 26021249a4e188d855732d800d94f049488e672b @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/views/admin/
2  django/views/admin/
@@ -752,7 +752,7 @@ def _get_admin_field_form_widget(field, name_prefix, rel, add, change):
# fields with relationships to editable objects get an "add another" link,
# but only if the field doesn't have raw_admin ('cause in that case they get
# the "add" button in the popup)
- elif field.rel and isinstance(field.rel, meta.ManyToOne) and
+ elif field.rel and (isinstance(field.rel, meta.ManyToOne) or isinstance(field.rel, meta.ManyToMany)) and
t.append('{%% if perms.%s.%s %%}' % (,
t.append(' <a href="../../../%s/%s/add/" class="add-another" id="add_%s" onclick="return showAddAnotherPopup(this);">' % \
(,, field_id))

0 comments on commit 2602124

Please sign in to comment.
Something went wrong with that request. Please try again.