django-smart-selects: when i use the demo code, it shows error:Exception Type: NoReverseMatch, details see below
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/myapp/location/add/
Django Version: 1.10.2
Python Version: 3.5.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
'smart_selects']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Template error:
In template D:\Program Files (x86)\anaconda3\lib\site-packages\django\contrib\admin\templates\admin\change_form.html, error at line 33
Reverse for 'chained_filter' with arguments '()' and keyword arguments '{'foreign_key_model_name': 'Location', 'foreign_key_app_name': 'myapp', 'model': 'Location', 'foreign_key_field_name': 'country', 'field': 'continent', 'app': 'myapp', 'manager': True, 'value': '1'}' not found. 0 pattern(s) tried: [] 23 : {% endblock %}
24 : {% endif %}
25 :
26 : {% block content %}<div id="content-main">
27 : {% block object-tools %}
28 : {% if change %}{% if not is_popup %}
29 : <ul class="object-tools">
30 : {% block object-tools-items %}
31 : <li>
32 : {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
33 : <a href=" {% add_preserved_ filters history_url %}" class="historylink">{% trans "History" %}</a>
34 : </li>
35 : {% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif %}
36 : {% endblock %}
37 : </ul>
38 : {% endif %}{% endif %}
39 : {% endblock %}
40 : <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
41 : <div>
42 : {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
43 : {% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
392. (lookup_view_s, args, kwargs, len(patterns), patterns)
Exception Type: NoReverseMatch at /admin/myapp/location/add/
Exception Value: Reverse for 'chained_filter' with arguments '()' and keyword arguments '{'foreign_key_model_name': 'Location', 'foreign_key_app_name': 'myapp', 'model': 'Location', 'foreign_key_field_name': 'country', 'field': 'continent', 'app': 'myapp', 'manager': True, 'value': '1'}' not found. 0 pattern(s) tried: []
Edit (by blag): Formatted with fenced code blocks.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15
Also, the code in
masterwas pushed out to PyPI as version 1.2.6, so you can safely upgrade with pip.What about the current code in
master? There are some changes there I haven’t pushed to PyPI yet because I wanted to do more testing on them first, but they might fix this issue for you.