title: Template Does not Exist. Everything is Correct Yet is not Working
body: <p>I know it has been asked, but, this is different, please have a look below: I've just created a very simple test project, the folder structure is as such:<br>
    <a href="https://i.stack.imgur.com/36oAN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/36oAN.png" alt="folder structure update"></a></p>
  
  <p>Ignore the red marks, it's because, it was said to not detect  meta programming issues.  </p>
  
  <p>Just for simplicities sake, I've made the view to be called in the homepage itself, the main project urls.py has the urls:   </p>
  
  <pre><code>"""testproject URL Configuration
  
  The `urlpatterns` list routes URLs to views. For more information please see:
      https://docs.djangoproject.com/en/2.0/topics/http/urls/
  Examples:
  Function views
      1. Add an import:  from my_app import views
      2. Add a URL to urlpatterns:  path('', views.home, name='home')
  Class-based views
      1. Add an import:  from other_app.views import Home
      2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
  Including another URLconf
      1. Import the include() function: from django.urls import include, path
      2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
  """
  from django.contrib import admin
  from django.urls import path, re_path
  from test1.views import test1_detail
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      re_path('^$', test1_detail)
  ]
  </code></pre>
  
  <p>The tag_detail1 views file is just this:   </p>
  
  <pre><code>from django.shortcuts import render
  
  from test1.models import model_test1 as Model
  from django.shortcuts import render
  
  def test1_detail(request):
  
      tag = Model.objects.get(name__iexact='birlaman')
      return render(request,
              'test1/test.html',
              {'tag':tag})
  </code></pre>
  
  <p>The model database is just a simple one:   </p>
  
  <pre><code>from django.db import models
  
  
  class model_test1(models.Model):
  
      name = models.CharField(max_length=31)
      age = models.TextField()      
  </code></pre>
  
  <p>I've created some data in the database:   </p>
  
  <p><a href="https://i.stack.imgur.com/OamFY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OamFY.png" alt="database data"></a></p>
  
  <p>The settings.py is:     </p>
  
  <pre><code>"""
  Django settings for testproject project.
  
  Generated by 'django-admin startproject' using Django 2.0.1.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/2.0/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/2.0/ref/settings/
  """
  
  import os
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = '@i4=#&amp;q%8ib7(oe7h61n5&amp;&amp;t8w89!4jv2#c+r!jk8%cd%)kh$-'
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = []
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'test1',
      'test2'
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'testproject.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR,'templates')],
          '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',
              ],
          },
      },
  ]
  
  WSGI_APPLICATION = 'testproject.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  
  # Internationalization
  # https://docs.djangoproject.com/en/2.0/topics/i18n/
  
  LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/2.0/howto/static-files/
  
  STATIC_URL = '/static/'
  </code></pre>
  
  <p>The base.html is in the templates folder as configured by: <strong>os.path.join(BASE_DIR, 'template')</strong>. and It contains the simple html:  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
      &lt;title&gt;
          &lt;head&gt;Some head title&lt;/head&gt;
      &lt;/title&gt;
  
      &lt;body&gt;
          {%block content%}
              Some default content
          {%endblock%}
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>The base_test1.html only has one line:   </p>
  
  <pre><code>{%extends parent_template|default:"base.html"%}
  </code></pre>
  
  <p>And the test.html is only:  </p>
  
  <pre><code>{%extends parent|default:"test1/base_test1.html"%}
  
  {% block content %}
      &lt;h1&gt;test succeeded&lt;/h1&gt;
      &lt;p&gt;
          The tag is: {{tag.name}}
      &lt;/p&gt;
  {% endblock %}  
  </code></pre>
  
  <p>Now, every file relevant for the functioning of the project is given entirely above, and everything as you may verify is in the right place. Now, if it's a bug in django 2.0, It'd be a different thing, but what in the world gives me the following error, after I hit: ./manage.py runserver  </p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://127.0.0.1:8000/
  
  Django Version: 2.0.1
  Python Version: 3.5.2
  Installed Applications:
  ['django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'test1',
   'test2']
  Installed Middleware:
  ['django.middleware.security.SecurityMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware']
  
  Template loader postmortem
  Django tried loading these templates, in this order:
  
  Using engine django:
      * django.template.loaders.filesystem.Loader: /home/liz/Documents/testproject/templates/test1/test.html (Source does not exist)
      * django.template.loaders.app_directories.Loader: /home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/contrib/admin/templates/test1/test.html (Source does not exist)
      * django.template.loaders.app_directories.Loader: /home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/contrib/auth/templates/test1/test.html (Source does not exist)
  
  
  
  Traceback:
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
    35.             response = get_response(request)
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
    128.                 response = self.process_exception_by_middleware(e, request)
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
    126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  
  File "/home/liz/Documents/testproject/test1/views.py" in test1_detail
    11.             {'tag':tag})
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/shortcuts.py" in render
    36.     content = loader.render_to_string(template_name, context, request, using=using)
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/template/loader.py" in render_to_string
    61.         template = get_template(template_name, using=using)
  
  File "/home/liz/DocFolder1/DocFolder1/Environments/django2/lib/python3.5/site-packages/django/template/loader.py" in get_template
    19.     raise TemplateDoesNotExist(template_name, chain=chain)
  
  Exception Type: TemplateDoesNotExist at /
  Exception Value: test1/test.html
  </code></pre>
  
  <p>Please tell me what the problem is, it's been 2 days I've tried to figure this out, I've remade the project several times, yet it doesn't budge. There are similar problems online but the solutions mentioned don't work.</p>
  
  <p>EDIT -------------------------------------------------
  I added a urls.py in under test1 folder and added the codes:   </p>
  
  <pre><code>from django.urls import re_path
  from organizer.views import test1_detail
  
  
  
  urlpatterns = [
      re_path('^$', tag_detail)
  ]  
  </code></pre>
  
  <p>and also in the main urls.py I used this:  </p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path, re_path
  from django.urls import re_path, include
  from test1 import urls as test1_url
  
  urlpatterns = [
      re_path('admin/', admin.site.urls),
      re_path('^', include(test1_url))
  
  ]  
  </code></pre>
  
  <p>However, it still doesn't solve the issue.</p>