Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template loading order #12

Open
henhuy opened this issue Feb 25, 2019 · 2 comments
Open

Template loading order #12

henhuy opened this issue Feb 25, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@henhuy
Copy link
Contributor

henhuy commented Feb 25, 2019

Right now, templates are tried to be loaded in this order:

  1. wam/templates/
  2. wam/stemp/templates/
  3. wam/stemp_abw/templates/
  4. ... (all wam-apps)
  5. django default templates
  6. ...

Thus, a template in stemp_abw which has same name as a template in stemp will not be loaded, but the stemp template instead...
Possible solutions:

  • Nest create "widgets" folder into app_name/templates/app_name/ folder or
  • Create new look-up order, like:

Suggested loading order:

  1. current app always comes first!
  2. wam template
  3. django default templates
  4. ... and dont look at other apps!
@henhuy henhuy self-assigned this Feb 25, 2019
@henhuy henhuy added the bug Something isn't working label Feb 25, 2019
4lm pushed a commit to rl-institut/WAM_APP_stemp_abw that referenced this issue Feb 26, 2019
Caution: As worksround, the slider was renamed as there's a template in stemp app with the same name. For details see rl-institut/WAM#12
@Bachibouzouk
Copy link
Contributor

A solution for that could also be to add the name of the app in front the the template name,

@nesnoj
Copy link
Member

nesnoj commented May 2, 2019

Yes, this should work but will lead to long, bulky names such as an_advanced_super_app-layer_region_select.html. Furthermore, if app developers do not follow the naming rules (I admit it's quite unlikely that two devs are this nasty ;) we get back to the same problem..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants