Answer the question
In order to leave comments, you need to log in
How to use tags with spaces in django-taggit?
Tags are screwed to the portal, they work well. But in the admin panel they are separated by a space. If I do ctrl-c=>ctrl-v in the tag field of a phrase with a space, I get
Reverse for 'posts_by_tag' with arguments '()' and keyword arguments
'{u'tag': u'\u0411\u0430\u043d\u043a
\u0422\u0430\u0432\u0440\u0438\u043a\u0430'}' not
found. 1 pattern(s) tried: ['blog-list/posts/(?P<tag>\\w+)$']
Answer the question
In order to leave comments, you need to log in
In general, it is advised in the world to use "" for multi-word tags. But be careful when writing a pattern in regexp for your url, so that there are no embarrassments, because although such a tag is considered to be a single line, in the url it must be given a pattern suitable for all the conditions of the tag (number of spaces, characters before and after it).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question