It seems by default django\'s url solver perform case sensitive search for solving url and differentiate between \'/Login\' and \'login\'. My url patterns are as follows.
According to this ticket:
Support for inline flags in regular expression groups ((?i), (?L), (?m), (?s), and (?u)) was deprecated in Django 1.11 and removed in Django 2.1
In Django 2.2 adding (?i) to the start of a pattern produces this exception:
ValueError: Non-reversible reg-exp portion
confusingly, adding it to the end produces this warning:
DeprecationWarning: Flags not at the start of the expression
The new suggested way to handle case insensative URLs in Django is to use a custom 404 handler.
FWIW, that ticket also suggests "case-insensitive URLs aren't a good practice", however it doesn't provide any more arguement for this.
There is a package on PyPi called django-icase that looks like a good option