Django, javascript and code ruse problem
- by dragoon
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.