How to switch json context between two pages in djanog

22 views
Skip to first unread message

Ashish Kumar

unread,
Mar 31, 2014, 2:30:15 AM3/31/14
to django...@googlegroups.com
I have two html pages with different json context ,I have templates for both pages which contains a script which on loading the pages individually loads the context into the list.Now i want to develop a toggle button which onclicking changes the context ,is there any way i can do this with ajax i am using django framework.can anybody please help me with this.

My views are like this

Class Myview(Baseclass):
   def template():
      return template
   def jsonContext():
     return .content()
   def context():
      return {}

My templates are like this:
{extend 'base.html'}
{{list.render}}
Reply all
Reply to author
Forward
0 new messages