0

I need help to load correctly the templates. Followed the django documentation and load my templates in the templates dir.

What i need, is to change default django name to my own name. I customized my base_site.html, but still the names from my code doesn't show, therefore i think the path is broken. Can someone please help me to fix the dirs correctly?

TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', # 'DIRS': [os.path.join(BASE_DIR,'templates')], 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 

That is how my code looks like enter image description here

enter image description here

1 Answer 1

1

It seems that it required a master templates dir in the main dir where the manage.py stay. ---the book:

Create a templates directory in your project directory (the one that contains manage.py). Templates can live anywhere on your filesystem that Django can access. (Django runs as whatever user your server runs.) However, keeping your templates within the project is a good convention to follow. Open your settings file (mysite/settings.py, remember) and add a DIRS option in the TEMPLATES setting

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.