Changes between Version 9 and Version 10 of Ticket #30021
- Timestamp:
- Dec 7, 2018, 8:27:15 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30021 – Description
v9 v10 25 25 """ 26 26 from django.conf import settings 27 ++ has_mixed = getattr(settings, 'SITE_MIXED_MODE')28 ++ has_site = getattr(settings, 'SITE_ID', '')27 ++ site_id = getattr(settings, 'SITE_ID', '') 28 ++ mixed = getattr(settings, 'SITE_MIXED_MODE', '') 29 29 -- if getattr(settings, 'SITE_ID', ''): 30 ++ if has_site and not has_mixed:31 30 ++ if site_id and not mixed: 31 -- site_id = settings.SITE_ID 32 32 return self._get_site_by_id(site_id) 33 33 elif request: 34 34 return self._get_site_by_request(request) 35 ++ elif has_site and has_mixed and settings.SITE_MIXED_MODE == True: 36 ++ site_id = settings.SITE_ID 35 ++ elif site_id and mixed == True: 37 36 ++ return self._get_site_by_id(site_id) 38 37