gtalarico / django-vue-template

Django Rest + Vue JS Template
https://django-vue-template-demo.herokuapp.com/
MIT License
1.58k stars 406 forks source link

Question about TEMPLATES config #64

Closed oussama-he closed 4 years ago

oussama-he commented 4 years ago

I have a question about the TEMPLATES config in this project. It looks like this"

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        # Add dist to
        'DIRS': ['dist'],
        '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',
            ],
        },
    },
]

As we see 'DIRS' has a list that looks like this ['dist']. I want to know how the Django finds this directory which is outside of the Django project directory?

gtalarico commented 4 years ago

Paths are relative to current working direvtory (manage.py) and that's where dist would be