Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

magic-removal: fixed #1617 (raw_id_admin and limit_choices_to).

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3efbb1fdf278382af7e4bec1ac86cbbde282a361 1 parent 15e368e
@jacobian jacobian authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/templates/widget/foreign.html
View
2  django/contrib/admin/templates/widget/foreign.html
@@ -2,7 +2,7 @@
{% output_all bound_field.form_fields %}
{% if bound_field.raw_id_admin %}
{% if bound_field.field.rel.limit_choices_to %}
- <a href="../../../{{ bound_field.field.rel.to.app_label }}/{{ bound_field.field.rel.to.module_name }}/?{% for limit_choice in bound_field.field.rel.limit_choices_to.items %}{% if not forloop.first %}&amp;{% endif %}{{ limit_choice|join:"=" }}{% endfor %}" class="related-lookup" id="lookup_{{ bound_field.element_id }}" onclick="return showRelatedObjectLookupPopup(this);"> <img src="{% admin_media_prefix %}img/admin/selector-search.gif" width="16" height="16" alt="Lookup"></a>
+ <a href="{{ bound_field.related_url }}?{% for limit_choice in bound_field.field.rel.limit_choices_to.items %}{% if not forloop.first %}&amp;{% endif %}{{ limit_choice|join:"=" }}{% endfor %}" class="related-lookup" id="lookup_{{ bound_field.element_id }}" onclick="return showRelatedObjectLookupPopup(this);"> <img src="{% admin_media_prefix %}img/admin/selector-search.gif" width="16" height="16" alt="Lookup"></a>
{% else %}
<a href="{{ bound_field.related_url }}" class="related-lookup" id="lookup_{{ bound_field.element_id }}" onclick="return showRelatedObjectLookupPopup(this);"> <img src="{% admin_media_prefix %}img/admin/selector-search.gif" width="16" height="16" alt="Lookup"></a>
{% endif %}
Please sign in to comment.
Something went wrong with that request. Please try again.