RequireJS and Djangoby Justin Michalicek on May 5, 2014, 1:49 a.m. UTC
What I ended up doing is first, in my base template which all other templates extend, I did this
Normally you are shown to have a data-main attribute on there which references a js file to start running right away. If you do that you can't have your global config all in one spot, though. So after that line I put in my global config like below, which allowed me to solve the other two problems.
One thing to be aware of with the deps and callback is that my understanding after reading the docs is that those may not be guaranteed to have loaded by the time other scripts being loaded using RequireJS have already loaded, so it's possible those settings would not yet be set. I haven't run into any trouble with that in any testing I've done since making the change, though.