I'm building a large scale Backbone Marionette app on top of Django utilizing the Django asset pipeline to compile all of the assets.
Right now, I am saving my Handlebars templates as JS strings in the app object like so:
App.Templates.Header = '
<div id="header">
... header stuff ...
</div>
'
class App.Views.Header extends Backbone.Marionette.ItemView
template: App.Templates.Header
I'm not sure that saving templates out into JS strings is really the best way to do things at all. With Rails, you can save out template files and reference them directly in the file structure with JST:
template: JST['apps/base/templates/header']
My understanding is that this is a feature that is baked in to Rails. Is something like this possible with Django? Or, is there another more efficient way that I should be handling my templates?