简体   繁体   中英

Django-taggit tags with whitespace in name?

How can I use tags with whitespace char in their name with django-taggit? For example, "Some simple tag"? Because if I ctrl-c=>ctrl-v some phrase to tags field in my admin panel, on page with this tag i get something like this:

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+)$']

, but if I try add tag with whitespace-it just cut on whitespace char and starts new tag. How can I fix it?

Multi-word tags in Wagtail need to be quoted, eg "my tag".

There are two pull requests open that address this topic:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM