Skip to content

ImportError: jinja2 must be installed to use Jinja2Templates (Starlette 1.0 compatibility) #568

Description

@kislasi

With the release of Starlette 1.0.0, jinja2 is no longer bundled and its absence triggers a hard ImportError when starlette.templating is imported.

Currently, fastapi_cache/coder.py imports TemplateResponse from starlette.templating at the top level. This causes the application to crash on startup if the user is using a minimalist FastAPI installation (without the [standard] or [all] extras)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions