django-parler icon indicating copy to clipboard operation
django-parler copied to clipboard

Fallback to first site_id when current site_id is not in PARLER_SETTINGS

Open nichoski opened this issue 1 year ago • 0 comments

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.

nichoski avatar Jan 27 '24 00:01 nichoski