I have this urlpath:
path('download/<str:fpath>/<str:fname>', views.download, name='download'),
And this is the view:
def download(request, fpath, fname):
# some code
In template, I have this href tag and I want to pass those strings as arguments to the download
view.
<a href="{% url 'download' 'lms/static/lms/files/homework/Math 1/3/3' 'hmm.pdf' %}">click me</a>
But I get this error:
NoReverseMatch at /
Reverse for 'download' with arguments '('lms/static/lms/files/homework/Math 1/3/3', 'hmm.pdf')' not found. 1 pattern(s) tried: ['download/(?P<fpath>[^/]+)/(?P<fname>[^/]+)\\Z']
How can I fix this?