[Answered ]-NoReverseMatch error in django app

1👍

Your encpw variable ends in a newline character, by default the . regular expression character does not capture these. Try altering your regex so the DOTALL flag is turned on, which will match for newline characters.

url(r'(?s)^getimage/(?P<extractedcontent_id>\d+)/(?P<encpw>.*)/$','getimagecontent',name='getimagefile'),

Notice the (?s) at the very beginning this will turn the DOTALL flag on.

1👍

You don’t show where encpw comes from, but it appears to have a newline character (\n) at the end, which won’t match the url regex.

Leave a comment