when i use the demo code, it shows error:Exception Type: NoReverseMatch, details see below
See original GitHub issueEnvironment:
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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15
Top Results From Across the Web
when i use the demo code, it shows error:Exception Type ...
... it shows error, details see below when i use the demo code, it shows error:Exception Type: NoReverseMatch, details see below on Oct...
Read more >django - What is a NoReverseMatch error, and how do I fix it?
The NoReverseMatch error is saying that Django cannot find a matching url pattern for the url you've provided in any of your installed...
Read more >Solving Django error 'NoReverseMatch at' URL with ...
Main reasons behind this error are: 1) Using wrong URL name in template html file. For example in below template code snippet, <a...
Read more >[Solved]-How do I fix this Django error "Exception Type ...
This error comes when your table information is not there in the database or there is some conflict with your existing database. For...
Read more >Django Tutorial: "NoReverseMatch" Error - Google Groups
Django Version: 2.0.6. Exception Type: NoReverseMatch. Exception Value: Reverse for 'results' with arguments '(1,)' not found.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also, the code in
master
was 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.