Django renders templates while being agnostic of the actual template engine, as the following diagram shows:
Each template is rendered by trying each template backend specified by the TEMPLATES variable in settings.py in order.
A Loader object corresponding to the backend will search for the template. Based on the backend's configuration, several kinds of loaders will be used. For instance, filesystem.Loader loads templates from the filesystem according to DIRS, and app_directories.Loader loads templates from within app directories.
If a Loader is successful, the search ...