what-digital / divio

A project for tracking divio.com deployment issues
0 stars 0 forks source link

settings.LANGUAGES gets ignored in favor of aldryn-django for MS Azure (2.2.12.2A3) settings.json #28

Open viktor-yunenko opened 4 years ago

viktor-yunenko commented 4 years ago

On project https://control.divio.com/control/6276/edit/82867 the client found out today that out of 4 languages only EN and DE are accessible in admin. The source code is identical to other projects where overriding of settings.LANGUAGES after aldryn_addons.settings.load(locals()) works as expected. After the change of LANGUAGES field to ["en", "de", "fr", "it"] in divio control panel they appeared again.

The languages config:

LANGUAGE_CODE = 'en'
LANGUAGES = [
    ('en', 'English'),
    ('de', 'German'),
    ('fr', 'French'),
    ('it', 'Italian'),
]
SITE_ID = 1
CMS_LANGUAGES = {
    SITE_ID: [
        {
            'code': 'en',
            'name': 'English',
        },
        {
            'code': 'de',
            'name': 'German',
        },
        {
            'code': 'fr',
            'name': 'French',
        },
        {
            'code': 'it',
            'name': 'Italian',
        },
    ],
    'default': {
        'fallbacks': ['en', 'de', 'fr', 'it'],
        'redirect_on_fallback': True,
        'public': True,
        'hide_untranslated': False,
    }
}

The version on which it's based can be seen here - https://gitlab.com/what-digital/djangocms-template/-/blob/master/settings.py#L333

viktor-yunenko commented 4 years ago

Hi @GaretJax, I haven't had issues with settings.LANGUAGES before, might it be related to 2.2.12.2A3 version? And if yes, can we update this AZ project to a newer aldryn-django version now?

macolo commented 3 years ago

@kinkerl will check regarding if we can upgrade to a more recent aldryn-django (regarding Azure compatibility)

kinkerl commented 3 years ago

the latest aldryn-django version should support azure