Last active
December 20, 2019 11:31
-
-
Save Sheikh2Imran/7860fb6c3d87f3e2e88f0060fb045c78 to your computer and use it in GitHub Desktop.
How to setup template path in Django settings.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| TEMPLATES = [ | |
| { | |
| 'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
| 'DIRS': [os.path.join(BASE_DIR, 'templates')], | |
| 'APP_DIRS': True, | |
| 'OPTIONS': { | |
| 'context_processors': [ | |
| 'django.template.context_processors.debug', | |
| 'django.template.context_processors.request', | |
| 'django.contrib.auth.context_processors.auth', | |
| 'django.contrib.messages.context_processors.messages', | |
| ], | |
| }, | |
| }, | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment