Elf
Django locale not working on production
Hi, I deployed a django app and I use locale settings for 2 languages: english and greek. Although locally works fine, after deployment the greek language urls don't work. Any idea why?
in settings.py i have this config:
LANGUAGE_CODE = 'en'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_TZ = True
EXTRA_LANG_INFO = {
'gr': {
'bidi': False,
'code': 'gr',
'name': 'greek',
'name_local': 'Ελληνικά',
},
'en': {
'bidi': False,
'code': 'en',
'name': 'English',
'name_local': 'English',
},
}
LANG_INFO = dict(EXTRA_LANG_INFO.items())
django.conf.locale.LANG_INFO = LANGINFO
LANGUAGES = (
('en', ('English')),
('gr', _('Greek')),
)
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale/'),
)
Project id: afb57b50-917e-49d3-a975-e7f460f74eb6
11 replies
Problem with package cairo during deployment.
Hi, I try do deploy a django app but I get an error
#10 36.09 Using legacy 'setup.py install' for django-libs, since package 'wheel' is not installed.
#10 36.09 Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
#10 36.09 Using legacy 'setup.py install' for psycopg2, since package 'wheel' is not installed.
#10 36.09 Using legacy 'setup.py install' for svglib, since package 'wheel' is not installed.
#10 36.09 Building wheels for collected packages: pycairo
#10 36.09 Building wheel for pycairo (pyproject.toml): started
#10 36.55 Building wheel for pycairo (pyproject.toml): finished with status 'error'
#10 36.57 error: subprocess-exited-with-error
#10 36.57 × Building wheel for pycairo (pyproject.toml) did not run successfully.
#10 36.57 │ exit code: 1
#10 36.57 ╰─> [15 lines of output]
#10 36.57 running bdist_wheel
#10 36.57 running build
#10 36.57 running build_py
#10 36.57 creating build
#10 36.57 creating build/lib.linux-x86_64-cpython-38
#10 36.57 creating build/lib.linux-x86_64-cpython-38/cairo
#10 36.57 copying cairo/init.py -> build/lib.linux-x86_64-cpython-38/cairo
#10 36.57 copying cairo/init.pyi -> build/lib.linux-x86_64-cpython-38/cairo
#10 36.57 copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo
#10 36.57 running build_ext
#10 36.57 Package cairo was not found in the pkg-config search path.
#10 36.57 Perhaps you should add the directory containing `cairo.pc'
#10 36.57 to the PKG_CONFIG_PATH environment variable
#10 36.57 No package 'cairo' found
#10 36.57 Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
#10 36.57 [end of output]
#10 36.57 ERROR: Failed building wheel for pycairo
#10 36.57 Failed to build pycairo
In localhost the app runs normally. Can anyone help me find a solution?
16 replies