On Sun, Apr 8, 2012 at 10:14 PM, Rob Peters
<[email protected]> wrote:
> Hi everyone,
>
> I'm still working on my beta release.
>
> I'm deploying to a WebFaction account running Django 1.3 and using
> Apache. In standard Django style, I've mapped my static media to a
> different directory than my Django install. Static media is served from
> "/media/" and my pyjamas app is served from "/processtrain/". Now, the
> processtrain.html file calls "bootstrap.py", which dynamically
> calculates the name of the *.nocache.js file to call. The problem is, it
> looks for it at "/processtrain/HangMan.nocache.js", when the file is at
> "/media/HangMan.nocache.js".
>
> Now, I edited the "bootstrap.py" file, appending
> "/media/djangoapps/processtrain/" in front of the dynamically generated
> path name. This is moderately successful, in that it loads the right
> 5MB+ main javascript file. However, now I'm getting an error saying
> "$pyjs.loaded_modules[t.module] is undefined". I'm thinking that my
> modification of the bootstrap.js file has caused the modules not to load.
>
> I also suspect the answer is staring me in the face, but my brain has
> officially stopped. Can some kind soul point me in the right place? How
> can I have my static JS files at a different URL than my main django
> application?

try looking into the pygwt:module <meta> tag processing done by bootstrap.js:

var selectorURL = parts[0] + parts[1] + ".nocache.html";

... you want to influence `parts`, because all other urls are relative to that.

take a look at these:

https://groups.google.com/d/msg/pyjamas-dev/4-42LlfiYPw/vHaxjXlD34sJ
https://groups.google.com/d/msg/pyjamas-dev/4-42LlfiYPw/JDLzuQauWSUJ

... and lmk if it won't do what you want.

-- 

C Anthony

Reply via email to