5👍
Django URL matching is very powerful if not always as convenient as it could be. As Brian says, you need to use the pattern r’^$’ to force your pattern to match the entire string. With r”, you are looking for an empty string anywhere in the URL, which is true for every URL.
Django URL patterns nearly always start with ^ and end with $. You could in theory do some fancy URL matching where strings found anywhere in the URL determined what view function to call, but it’s hard to imagine a scenario.
- OpenCV imread hanging when called from a web request
- How to unit test a form with a captcha field in django?
- Django-allauth: how to properly use email_confirmed signal to set user to active
Source:stackexchange.com