Mohamed Feddad

43%
Flag icon
The default project layout created by the startproject command does not define a location for your templates. This is very easy to configure. Create a directory named templates in your project's root directory. Specify the value for DIRS inside the TEMPLATES variable in your settings.py: (can be found within superbook/settings/base.py in our superbook project) BASE_DIR = os.path.dirname(os.path.dirname(__file__))   TEMPLATES = [     {         'BACKEND': 'django.template.backends.django.DjangoTemplates',         'DIRS': [os.path.join(BASE_DIR, 'templates')],         'APP_DIRS': True,        ...more
Django Design Patterns and Best Practices: Industry-standard web development techniques and solutions using Python, 2nd Edition
Rate this book
Clear rating