I'm storing 3 french levels and I'm storing the level name as VARCHAR because I read that postgresql doesn't support NVARCHAR
class Level(db.Model):
id = db.Column(db.Integer, primary_key=True)
level_name = db.Column(db.VARCHAR(250))
Here's what I'm trying to store:
level1 = Level(level_name= 'Débutant')
level2 = Level(level_name= 'Intermédiarie')
level3 = Level(level_name= 'Avancé')
And here's the output in Json:
[{"id":1,"level_name":"D\u00e9butant"},
{"id":2,"level_name":"Interm\u00e9diarie"},
{"id":3,"level_name":"Avanc\u00e9"}]
Things I have tried and didn't work:
- Changing the type to Unicode
- Setting the locale to French with flask-babel
- Storing u'Débutant'