Skip to content

Auto-populating templates does not work with cached.loader  #48

@jnns

Description

@jnns

With the following setup, auto-populating a database template (saving with empty content) does not work; the content is empty after all.

TEMPLATE_LOADERS = (
    'dbtemplates.loader.Loader',
    ('django.template.loaders.cached.Loader', (
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
    )),
)

The rationale behind this configuration is to retrieve templates from the database, if they are present (because they might need to be changed frequently). And load all filesystem based templates (that are also in version control) from the cache (which gets updated on app restarts only).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions