4👍
Django’s slugify
method:
Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace.
you are looking for a Camel Case’d tag:
http://localhost:9999/tag/RandomTag/
you need to use lowercase:
http://localhost:9999/tag/randomtag/ # or `random-tag` depending on the name
Check your DB to see exactly how the slug
is saved
1👍
Timmy’s answer is correct in ascertaining the problem — slugs are lowercase. He suggests you use a lowercase url. Not a bad solution… but perhaps you like the url like that?
If you want the slug to be case insensitive, set slug_field = 'slug__iexact'
on your view.
- [Django]-Permission for field in Wagtail Page
- [Django]-How to output SQL generated by Django Admin
- [Django]-Where's the primary key of the object I want to update in django using modelform?
Source:stackexchange.com