I am working with Django URL pattern for my project. I am sending a String containing special characters and numbers. While reading a string in python function it won't get the ? in a function.
html
{% for user_name in userSet%}
<a class="dropdown-item" href="/slackNotification/{{user_name}}/{{data.question}}">{{ user_name }}</a>
{% endfor %}
url
path('slackNotification/<str:slack_user_name>/<str:question>',views.slackNotification)
When I get the all details through URL then string whichever I received in the python code it won't contain ? mark even though my input contains Special characters and numbers.
input: What is your name? output: What is your name(question mark not available;)
Question I have tried this:
re_path(r'^slackNotification/<str:slack_user_name>/(?P<question>\w+)',views.slackNotification)
Output The current path didn't match any of the url
I want to know the exact regular expression for my requirement ??