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

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -