How to pass special character in url


(Saurabh Kapoor) #1

suppose i want to pass something like saurabh.(kapoor) by a url like path(‘slug:sg/’,views.hh,name=“hh”) . i tried slug:sg but it only worked for [a-zA-Z0-9_] now i want to pass special character like . () and , in the url to views.py .


(Shekhar Nunia) #2

you can make your own regex which can satisfy you need, I don’t have much experience in making regex but you can check this regex website which has already many pre-built regex and you can also try making more and test them at same time. I hope this will help you in some way.