Re: templating javascript code

2007-12-18 Thread Malcolm Tredinnick
On Mon, 2007-12-17 at 09:47 -0800, msoulier wrote: > On Dec 2, 8:27 pm, Darryl Ross <[EMAIL PROTECTED]> wrote: > > I've done this is CSS files before, so it should work just fine. Just > > make sure you set the correct Content-Type header in your JS view. > > FTR, this works fine. I couldn't use

Re: templating javascript code

2007-12-17 Thread msoulier
On Dec 2, 8:27 pm, Darryl Ross <[EMAIL PROTECTED]> wrote: > I've done this is CSS files before, so it should work just fine. Just > make sure you set the correct Content-Type header in your JS view. FTR, this works fine. I couldn't use render_to_response() as I had to supply the mimetype, but oth

Re: templating javascript code

2007-12-02 Thread Darryl Ross
msoulier wrote: > I want to split this javascript out. Has anyone tried templating > javascript like any other file? I'm going to try it out, but I thought > I'd ask if anyone knew of any problems, or any better way to do this. I've done this is CSS files before, so it should work just fine. Just

templating javascript code

2007-12-02 Thread msoulier
Hi, I'm adding some Ajax effects to my Django site, and there are some things in the javascript that I'd like to template. Currently my javascript is inline in my index.html file, so I can template things like var debug = {{ debug }}; var refreshtime = {{ refreshtime }}; That way, settings in m