Diego-MX
Diego-MX

Reputation: 2349

Django. Why do admin templates go in base folder instead of mysite?

I'm following the django tutorial, and I don't understand why put the templates folder for the admin pages in the base directory, instead of having it in mysite directory.

In fact, when adding templates to the polls app, these were put in the polls directory. Is there an underlying reason for this to happen? Will I run into trouble if I change this configuration?

Upvotes: 3

Views: 236

Answers (1)

Jed Fox
Jed Fox

Reputation: 3025

An issue I ran into once with putting templates in apps’ template directories was that the template loader would use the first template it found by looping through the INSTALLED_APPS setting, so if your app comes after the admin app in the list (which it probably does), templates overriden there won’t be used.

Upvotes: 1

Related Questions