I use the django url tag to go from one view to another:
<a href = {% url wiki_view item %}>Read more here</a>
For most βitemsβ this works fine. But I have a "subject" with / character: Sci-Fi / Fantasy. In this case, I get an error
Caught NoReverseMatch on rendering: Reverse for 'wiki_view' with arguments' (u'Sci-fi / Fantasy ',)' and keyword arguments' {} 'not found.
My urls.py is defined as such:
url(r'^wiki/page/(?P<page_title>[^/]*)/$', views.wiki_view, name = 'wiki_view'),
Is there a way to work with the "/" character this way?
source
share