def test_is_site_configuration_enabled(self): """ Test that is_site_configuration_enabled returns True when configuration is enabled. """ with with_site_configuration_context(configuration=test_config): assert configuration_helpers.is_site_configuration_enabled() # Test without a Site Configuration assert not configuration_helpers.is_site_configuration_enabled()
def test_is_site_configuration_enabled(self): """ Test that is_site_configuration_enabled returns True when configuration is enabled. """ with with_site_configuration_context(configuration=test_config): self.assertTrue(configuration_helpers.is_site_configuration_enabled()) # Test without a Site Configuration self.assertFalse(configuration_helpers.is_site_configuration_enabled())
def is_request_in_themed_site(): """ This is a proxy function to hide microsite_configuration behind comprehensive theming. """ # We need to give priority to theming/site-configuration over microsites return configuration_helpers.is_site_configuration_enabled( ) or microsite.is_request_in_microsite()
def get_journals_root_url(): """ Return the base url used to display Journals """ if journals_enabled(): if configuration_helpers.is_site_configuration_enabled(): return configuration_helpers.get_configuration_value( 'JOURNALS_URL_ROOT', settings.JOURNALS_URL_ROOT) else: return settings.JOURNALS_URL_ROOT else: return None
def get_journals_root_url(): """ Return the base url used to display Journals """ if journals_enabled(): if configuration_helpers.is_site_configuration_enabled(): return configuration_helpers.get_configuration_value( 'JOURNALS_URL_ROOT', settings.JOURNALS_URL_ROOT ) else: return settings.JOURNALS_URL_ROOT else: return None
def is_request_in_themed_site(): """ This is a proxy function to hide microsite_configuration behind comprehensive theming. """ # We need to give priority to theming/site-configuration over microsites return configuration_helpers.is_site_configuration_enabled() or microsite.is_request_in_microsite()
def is_request_in_themed_site(): """ This is a proxy function to site_configuration. """ return configuration_helpers.is_site_configuration_enabled()