On Mon, Apr 9, 2012 at 4:14 AM, 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.

 yeahh, you don't wanna do that.

> 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?

 well what you've described is not really sufficient, because only by
actually providing the source code and running it, seeing the errors
that you're seeing etc. would it be actually possible - read
"convenient" - to help you.

basically however i think you should either use apache rewrites, or
use django urls.py to specify each file (or subdir) and where its
target is, using wildcards where practical.

l.

Reply via email to