Skip to content

Instantly share code, notes, and snippets.

@doismellburning
Created June 9, 2012 12:43
Show Gist options
  • Save doismellburning/2900853 to your computer and use it in GitHub Desktop.
Save doismellburning/2900853 to your computer and use it in GitHub Desktop.
Template config in Django
PROJECT_DIR = os.path.dirname(__file__)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'templates'),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment