title: TypeError: expected str, bytes or os.PathLike object, not tuple, in a minimal Django application
body: <p>I'm building an application with Django. Whenever I try using <code>os.path.join()</code> in the <code>'DIRS'</code> list of the <code>TEMPLATES</code> setting I get <code>TypeError: expected str, bytes or os.PathLike object, not tuple</code>.</p>
  
  <pre><code>BASE_DIR = os.path.dirname(os.path.abspath(__file__)),
  
  # Settings
  settings.configure(
      INSTALLED_APPS = [
          'django.contrib.auth',
          'django.contrib.contenttypes',
          'django.contrib.staticfiles',
      ],
      MIDDLEWARE = [
          'django.middleware.common.CommonMiddleware',
          'django.middleware.csrf.CsrfViewMiddleware',
          'django.middleware.clickjacking.XFrameOptionsMiddleware',
      ],
      TEMPLATES = [
          {
              'BACKEND': 'django.template.backends.django.DjangoTemplates',
              'DIRS': [
                  os.path.join(BASE_DIR, 'templates'), # Here
              ],
              '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',
                  ],
              },
          },
      ],
      STATIC_URL = '/static/',
      STATICFILES_DIRS = [
          os.path.join(BASE_DIR, 'static'), # ...and HERE!
      ],
  )
  
  </code></pre>