0
我使用夹层构建我的网站。在模板中,我使用templatetag。当我传递给像“categorytofilter”这templatetag字,它的确定,但是当我试图通过unicode字符串:将unicode字符串传递给django模板中的templatetag导致错误
{% blog_recent_posts limit=6 category='Статьи' as recent_posts %}
我看到的错误:
'ascii' codec can't encode characters in position 10-15: ordinal not in range(128)
我怎样才能解决呢? TIA!
这有帮助吗?我不确定具体是什么答案,但我想这个链接会有所帮助:https://docs.djangoproject.com/en/dev/ref/unicode/#templates – themanatuf
它并没有帮助 – dizpers