Reputation: 593
I just have pushed my project to heroku and suddenly I am getting the following error:
/profile/list/48
unsupported locale setting
Error during template rendering
In template /app/Clientes/templates/Clientes/base.html, error at line 0
The thing is that I am running this project without any problems localy and in Heroku the error appears in a detail view.
I do not think that the problem is located in any of my files, but if requested I can post it here.
Upvotes: 0
Views: 1491
Reputation: 136977
In order to reduce the stack image size, the heroku 16 stack doesn't include language packs by default. You may still want to use a custom language pack though.
You can add the heroku-buildpack-locale
buildpack by running
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-locale
Then create a new .locales
file in the root of your repository containing
pt_BR.UTF-8
commit it and push to Heroku. This should let you use the locale.
Upvotes: 6
Reputation: 593
After I had the following code inside my filter file:
locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
The solution is given by Chris in this post.
Upvotes: 0