Django Admin Panel
<p>I am trying to set up a new blog.  I want to keep all my project templates folder in the same folder as where my settings.py is.  To do this I did the following...
[...]</p>

<pre><code>TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, "templates/")],
        'APP_DIRS': False,
        'OPTIONS': {
            'context_processors': [
</code></pre>

<p>[...]</p>

<p>But now, my admin panel layout doesn't work.  How can I circumvent the above solution when using the admin panel?  I get the error </p>

<p><code>Exception Type:    TemplateDoesNotExist
Exception Value:    admin/login.html</code></p>

<p>By disabling APP_DIRS you're forcing Django to look for your templates in the templates folder of your basedir regardless of where the app specifies them. This will break any plugins and also prevents you from namespacing templates. Its generally a bad idea. </p>

<p>DIRS is a list, so you can specify multiple locations if desperately want to hold the templates in a different locationand maintain access to teh admin</p>

python django