Open wooooodward opened 4 years ago
This tells the template render engine to serve index.html
from your configured directory.
Settings.py
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['dist'], # Add dist to dirs so Django looks for templates in /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',
],
},
},
]
So when deploying, your build script will put index.html
in /dist which mounts your application & Django will see this as a template and serve it when /
route is hit.
As far as I can tell the index URL path doesn't do anything.
backend/api/views.py
backend/urls.py