Django, javascript and code ruse problem
Posted
by dragoon
on Stack Overflow
See other posts from Stack Overflow
or by dragoon
Published on 2010-03-16T22:59:40Z
Indexed on
2010/03/16
23:01 UTC
Read the original article
Hit count: 220
Hi, I have some sort of a design problem with my Django AJAX application.
I have a template where I initialize js variable from django context variable like so:
var test = "{{ test }}";
This variable is than used in a number of js functions that are needed for interface to work properly.
So now I'm trying to reuse some content from this page in another page that loads it dynamically on some user interaction using jQuery.load(..), and I don't see any way how I can initialize that variable, so js functions don't work now.
Is there any solution for this or may be I'm doing it wrong?
Thanks.
© Stack Overflow or respective owner