@staticmethod
    @lru_cache.lru_cache()
    def get_default():
        # Since Engine is imported in django.template and since
        # DjangoTemplates is a wrapper around this Engine class,
        # local imports are required to avoid import loops.
        from django.template import engines
        from django.template.backends.django import DjangoTemplates
        django_engines = [engine for engine in engines.all()
                          if isinstance(engine, DjangoTemplates)]
        if len(django_engines) == 1:
            # Unwrap the Engine instance inside DjangoTemplates
            return django_engines[0].engine
        elif len(django_engines) == 0:
            raise ImproperlyConfigured(
                "No DjangoTemplates backend is configured.")
        else:
            raise ImproperlyConfigured(
                "Several DjangoTemplates backends are configured. "
                "You must select one explicitly.")
Check that an album can be updated
dataset/ETHPy150Open django/django/django/template/engine.py/Engine.get_default--crossover with--dataset/ETHPy150Open photo/openphoto-python/tests/unit/test_albums.py/TestAlbumUpdate.test_album_update