在 pythonanywhere 上部署时不支持的语言环境设置

Unsupported locale setting while deploying on pythonanywhere

所以我刚刚在 pythonanywhere 上建立了我的网站 运行,但我收到了这个错误:

不支持的区域设置

locale.setlocale(locale.LC_ALL, 'esp_esp')

完整追溯:http://dpaste.com/355VD3W

您的语言环境名称对于 pythonanywhere 平台是错误的,我们可以假设是 Linux,而不是 Windows,所以它不是 esp_esp (Windows)

而是

locale.setlocale(locale.LC_ALL, 'es_ES.utf8')  

locale.setlocale(locale.LC_ALL, 'es_ES')