phep
unread,Apr 20, 2017, 7:51:51 AM4/20/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi all,
I just got this (slightly reformated for readability) exception I really
can't explain:
8<------------
NoReverseMatch at /saule/taiga/import/1/display
Reverse for 'display_taiga_report' with arguments '()' and keyword arguments
'{'report_id': '1', 'option': 'error_view'}'
not found.
2 pattern(s) tried:
['saule/taiga/import/(?P<report_id>[0-9]+)/display/(?P<option>[a-z]+)$',
'saule/taiga/import/(?P<report_id>[0-9]+)/display$']
8<------------
Why would the first pattern does not match since it has the 2 arguments?
This is my (part of) my urls.py:
8<------------
from django.conf.urls import url
from saule import views
app_name = 'saule'
urlpatterns = [
# index
url(r'^$', views.index, name='index'),
# Display reports
# ... [ stuff removed ] ...
url(
r'^taiga/import/(?P<report_id>[0-9]+)/display$',
views.display_taiga_report,
name='display_taiga_report'
),
url(
r'^taiga/import/(?P<report_id>[0-9]+)/display/(?P<option>[a-z]+)$',
views.display_taiga_report,
name='display_taiga_report'
),
# ... [ more stuff removed ] ...
]
8<------------
Then the bailing template line (there, the report_id variable is correctly
set to 1, as can be seen in the exception message):
8<------------
<a href="{% url 'saule:display_taiga_report' report_id=report_id
option='error_view' %}">
8<------------
Thanks in advance,
phep