I have designed the following url pattern
re_path(r'^api/refresh-token/(?P<token>[1-9]+\_[0-9a-f]{32}\Z)/$',refresh_token)
1_6506823466dc409a93b83b2c5f3b7cf2 matches the pattern [1-9]+\_[0-9a-f]{32}\Z.
But when i hit the url it is not found.
System check identified no issues (0 silenced).
March 15, 2021 - 02:10:29
Django version 3.1.7, using settings 'tokenproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Not Found: /api/refresh-token/1_6506823466dc409a93b83b2c5f3b7cf2/
[15/Mar/2021 02:10:32] "PUT /api/refresh-token/1_6506823466dc409a93b83b2c5f3b7cf2/ HTTP/1.1" 404 3279

\Zassumes end of the string before the line terminator, but then there is still a slash to match.r'^api/refresh-token/(?P<token>[1-9]+\_[0-9a-f]{32})/$'