0
More generally, about/anything/
will match as well. The $
indicates the end of a string (or in this case url), just like ^
indicates the start of it. Checking against r'^about/'
only checks that the url starts with about/
, not where it ends.
That is generally the behaviour you want when you include another url config, like admin/
. In that case, the pattern shouldn’t end after admin/
, but there should be another part that matches a configured url in the included file. But if your pattern is a single view, you generally want the url to end after the end of the pattern, that’s when you include the $
, e.g. r'^about/$'
.
- [Answered ]-Django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: thumbnail
- [Answered ]-Django FileSystemStorage.url is wrong
- [Answered ]-Django, many duplicated queries in my TabularInline
Source:stackexchange.com