132번째 줄: |
132번째 줄: |
| 'OPTIONS': { | | 'OPTIONS': { |
| 'context_processors': [ | | 'context_processors': [ |
− | </syntaxhighlight>앱 내부의 경로를 읽지 못한다... | + | </syntaxhighlight>앱 내부의 경로를 읽지 못하는 경우엔 Settings.py 안의 DIR(공용 탬플릿 디렉터리)를 주석처리 한 후 다시 실행하면 앱 내부의 templates 디렉터리를 읽는다. |
− | | |
− | 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',
| |
− | | |
− | ],
| |
− | | |
− | },
| |
− | | |
− | },
| |
− | | |
− | ]
| |
| |} | | |} |
| [[분류:1. 장고 기초]] | | [[분류:1. 장고 기초]] |