jazzband / django-dbtemplates

Django template loader for database stored templates with extensible cache backend

Home Page:https://django-dbtemplates.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Docs for 1.8.x Template Loading

philippeowagner opened this issue · comments

Here an example taken from a settings.py that works.

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [ # your template dirs
        ],
        'APP_DIRS': False, 
        'OPTIONS': {
            'context_processors': [
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
                'django.template.context_processors.request',
            ],
            'loaders': [
                 'dbtemplates.loader.Loader', 
                 'django.template.loaders.filesystem.Loader',
                 'django.template.loaders.app_directories.Loader',
            ],
        },
    },
]

dbtemplates does not work in django 1.8 now in stable release..if you have some time create PR to develop-1.4 which will be merged to develop in #58 (maybe)

it works great using the develop-1.4 branch, will create PR