title: Can I use my own file extension for Django Templates and still include django.contrib.auth.urls?
body: <p>I can easily just use <code>html.djt</code> as i wish, but only if i let the built-in class based views know which template i want to use. A custom extension allows me to configure my editor to recognize django templates, which helps with code formatting and highlighting etc.</p>
  <p>In this example i would need to reference a template using <code>template_name</code>:</p>
  <pre><code>path(
      &quot;login/&quot;,
      auth_views.LoginView.as_view(template_name=&quot;registration/login.html.djt&quot;),
      name=&quot;login&quot;,
  ),
  </code></pre>
  <p>It can be handy to include all the url authentication patterns like this:</p>
  <pre><code>from django.urls import path, include
      # ...
  urlpatterns = [
      # ...
      path('', include('django.contrib.auth.urls')),
  ]
  </code></pre>
  <p>However is it still possible to use a custom file extensions for the templates if i include the built-in url patterns?</p>