Django project template loader setup
<p>Is it possible to set the  django project template loading priority so that first of all it loads the apps' "templates" folder and after that the project "templates". If the template exists in the app folder, then use it. If it does not exist in the app folder, then try load from project folder.</p>

<p>Or it is not normal way to load templates?
I ask because I see in the exception, that Django tries to load first of all global templates:</p>

<blockquote>
  <p><strong>Template-loader postmortem</strong></p>
  
  <p>Django tried loading these templates, in this order:</p>
  
  <p>Using engine django:</p>
  
  <ul>
  <li><p>django.template.loaders.filesystem.Loader: D:\myprojects\my-website\src\templates\home.html (Source does not exist)</p></li>
  <li><p>django.template.loaders.app_directories.Loader: C:\User\Python27\lib\site-packages\django\contrib\admin\templates\home.html (Source does not exist)</p></li>
  <li>django.template.loaders.app_directories.Loader: C:\User\Python27\lib\site-packages\django\contrib\auth\templates\home.html (Source does not exist)</li>
  <li>django.template.loaders.app_directories.Loader: D:\myprojects\my-website\src\website\templates\home.html (Source does not exist)</li>
  </ul>
</blockquote>

<p>Update your <code>TEMPLATES</code> setting, and put the <code>app_directories</code> loader before the <code>filesystem</code> loader.</p>

<p>If you currently have <code>'APP_DIRS': True</code>, you will have to remove this, and add the <code>loaders</code> option.</p>

<p>For example, you could change your <code>TEMPLATES</code> setting to:</p>

<pre><code>TEMPLATES = [{
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [os.path.join(BASE_DIR, 'templates')],
    'OPTIONS': {
        'loaders': [
            'django.template.loaders.app_directories.Loader',
            'django.template.loaders.filesystem.Loader',
        ],
    },
}]
</code></pre>

python django django-templates