I'm getting error NoReverseMatch at /, here I'm trying to catch the key like this enter image description here
and I can't get the key, when I take it and an error like the one above comes out
The code details are like this:
detail error like this: enter image description here
thank you.
what I want is to capture the key and then I make it as a parameter for the details of the article, when I catch the key but what comes out is an error.. sorry if my English is difficult to understand, I'm not good at English
CodePudding user response:
Use the path
path converter instead of str
if you wish to pass/capture values containing forward slash in your urls
urlpatterns = [
path('page/<path:key>', detailt_page, name='detail'),
]