Changes between Version 9 and Version 10 of Ticket #30021


Ignore:
Timestamp:
Dec 7, 2018, 8:27:15 PM (6 years ago)
Author:
Ira Abbott
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30021 – Description

    v9 v10  
    2525        """
    2626        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', '')
    2929--        if getattr(settings, 'SITE_ID', ''):
    30 ++     if has_site and not has_mixed:
    31                 site_id = settings.SITE_ID
     30++     if site_id and not mixed:
     31--          site_id = settings.SITE_ID
    3232            return self._get_site_by_id(site_id)
    3333            elif request:
    3434                 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:
    3736++             return self._get_site_by_id(site_id)
    3837
Back to Top