regex - How to include 'apostrophe' (`) in url? -
this regex [\w!@#$%^&*\u2019()+,.;:\'"-_ ]. allowing special characters except apostrophe (`). getting following error
reverse 'view_project' arguments '(u'fogg men\u2019s',)' , keyword arguments '{}' not found. 1 pattern(s) tried: ['dashboard/items/v/(?p<projectname>[\\w!@#$%^&*\\u2019()+,.;:\'"-_ ][\\w!@#$%^&*\\u2019()+,.;:\'"-_ ]+)$']
can tell me how allow apostrophe in urls?
there 2 things not working actually. 1 apostrophe , other "right single quotation mark". have added # -*- coding: utf-8 -*-
@ top of python file , replaced both non-ascii characters (') single quote worked.
string.replace("`","'") string.replace("’","'")
worked me.
thanks everyone.
Comments
Post a Comment