title: TypeError: expected str, bytes or os.PathLike object, not tuple in Django
body: <p>I am getting an error <code>TypeError: expected str, bytes or os.PathLike object, not tuple</code> many times tried different ways from the internet nothing worked. Could anyone help me with this problem.</p>
  <p>Here is my template part in settings.py file :</p>
  <pre><code>from pathlib import Path
  import os
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
  BASE_DIR = Path(__file__).resolve().parent.parent
  TEMPLATE_DIRS = (os.path.join(BASE_DIR / 'templates'),
                   )
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [TEMPLATE_DIRS,],
          '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',
              ],
          },
      },
  ]
  </code></pre>