Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django templates

create templates folder 
the open settings.py in project folder search until you find something like this

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',
            ],
        },
    },
]

the edit the DIRS

'DIRS': [os.path.join(BASE_DIR, 'templates')],
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #django #templates
ADD COMMENT
Topic
Name
4+1 =