예제 #1
0
def update_cache_for_url(url):
    if settings.ENABLED:
        selector = SelectedBackend()
        return selector.backend.update_url(url)
    return False
예제 #2
0
 def test_default_backend(self):
     s = SelectedBackend()
     self.assertTrue(isinstance(s.backend, PrerenderIO))
예제 #3
0
 def test_override_backend(self):
     s = SelectedBackend()
     self.assertTrue(isinstance(s.backend, TestBackend))
예제 #4
0
def update_cache_for_url(url):
    if getattr(settings, "SEO_JS_ENABLED", not settings.DEBUG):
        selector = SelectedBackend()
        return selector.backend.update_url(url)
    return False