mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #14363 -- Fixed render method of ManyToManyRawIdWidget to set attrs to an empty dict. Thanks, tyrion and dpn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -133,6 +133,8 @@ HTML escaped.
|
||||
>>> w = ManyToManyRawIdWidget(rel)
|
||||
>>> print conditional_escape(w.render('test', [m1.pk, m2.pk], attrs={}))
|
||||
<input type="text" name="test" value="1,2" class="vManyToManyRawIdAdminField" /><a href="../../../admin_widgets/member/" class="related-lookup" id="lookup_id_test" onclick="return showRelatedObjectLookupPopup(this);"> <img src="%(ADMIN_MEDIA_PREFIX)simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>
|
||||
>>> print conditional_escape(w.render('test', [m1.pk]))
|
||||
<input type="text" name="test" value="1" class="vManyToManyRawIdAdminField" /><a href="../../../admin_widgets/member/" class="related-lookup" id="lookup_id_test" onclick="return showRelatedObjectLookupPopup(this);"> <img src="%(ADMIN_MEDIA_PREFIX)simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>
|
||||
>>> w._has_changed(None, None)
|
||||
False
|
||||
>>> w._has_changed([], None)
|
||||
|
||||
Reference in New Issue
Block a user