[Answer]-Template not looked at app level template directory in django?

1👍

The standard project structure (partial) is this:

projectname
  |
  |-projectname  <-- settings.py, etc.
  |
  |-someapp
    |
    |-templates
      |
      |-someapp  <-- templates that are referenced with "someapp/a_template.html" go inside this directory
      |
      ...

I suspect you are missing the someapp directory inside your projectname/someapp/templates directory.


This structure allows templates from one app to be overridden in another app, provided the overriding app is placed before the original app in the INSTALED_APPS list in settings.py

Similar directory structure is used with static and/or media files as well.

👤frnhr

Leave a comment