django-parler
django-parler copied to clipboard
Fallback to first site_id when current site_id is not in PARLER_SETTINGS
Some projects have multi-site setup where sites can be added dynamically at run time, and the new sites end up with their SITE_ID not present in PARLER_LANGUAGES. This makes the language tabs in the admin pages not show for thew newly added sites.
This fix adds a fallback in these situations, where if the current SITE_ID is not present in PARLER_LANGUAGES, the first defined site_id in PARLER_LANGUAGES will be used.