Per the winning answer to this question and per everything else I've read on the interwebs, you're most likely going to put Django templates for mySubAppX
in a folder outside of mySubAppX
- most commonly myProject/templates/mySubAppX
where templates is a directory sibling to the actual mySubAppX
directory where the app is stored.
Why? Especially when you're making sub applications to be modular why?
It's not a rule and depends. There is supporter for the inside-app solution also.
In the centralized-template way, templates/app/template_name
, locating a template is fast and template names could be as simple as app/item.html
; you could easily manage/move the whole directory to some place such as memory-disk as well.
On the other hand, the inside-app ways, app/templates/app_template_name
or app/templates/app/template_name
, work better for packaged apps. For editing, my colleague found that the inside-app solution is more convenient for developing in Eclipse, anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With