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