29/07/2017

Disable template caching for dev

Just add config to ` local_settings.py ` file, or change loaders config
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(BASE_DIR, 'crm/templates'),
            os.path.join(BASE_DIR, 'company/templates'),
            os.path.join(BASE_DIR, 'landing/templates'),
            os.path.join(BASE_DIR, 'management/templates'),
            os.path.join(BASE_DIR, 'tip/templates'),
            os.path.join(BASE_DIR, 'performance/templates'),
            os.path.join(BASE_DIR, 'posts/templates'),
            os.path.join(BASE_DIR, 'elms/templates'),
        ],
 'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                "django.template.context_processors.tz",
                "django.template.context_processors.i18n",
                "django.template.context_processors.static",
                'django.contrib.messages.context_processors.messages',
                'elms.my_context_processors.access_to_settings',
                'django_settings_export.settings_export',
                'django.core.context_processors.request',
            ],
            'debug': DEBUG,
 'loaders': [
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ],
        },
    },
]

Không có nhận xét nào:

Đăng nhận xét