Advancing-the-Blog icon indicating copy to clipboard operation
Advancing-the-Blog copied to clipboard

Key Error

Open roe-ese opened this issue 9 years ago • 0 comments

Hello,

I'm getting a Key Error when post 'content' contains any special characters and foreign language letters in detail view. Oddly, in the list view, special characters and foreign language letters show up without problems.
How can I fix this?

I already tried adding to posts/models.py without any success.

class Post(models.Model): content = models.TextField() def unicode(self): return u'%s' %(self.content)

Kindly, James

// Debug message //

Django Version: 1.9 Exception Type: KeyError Exception Value: u'\u5929' Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py in quote, line 1303 Python Executable: /Users/***/.pyenv/versions/django-blog/bin/python Python Version: 2.7.10

roe-ese avatar Feb 10 '17 10:02 roe-ese