[Fixed]-Django template name conflict

14👍

The usual solution is to put templates in another subdirectory, named after your app, such as:

myproj/
  app1/
    templates/
      app1/
        index.html

This is done by the shipped applications (such as django.contrib.admin) and works pretty well. I usually use generic names like index.html in template root for project-specific files (e.g. the index of the whole site).

👤che

Leave a comment