source: MILK/trunk/milk_server/milk_server/lib/atomutilities.py @ 4478

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/lib/atomutilities.py@4478
Revision 4478, 427 bytes checked in by cbyrom, 12 years ago (diff)

Create new util to save the current editor state into a session variable + add code to track this so that the tab state can be roughly
maintained when swapping between tabs.

Line 
1#
2# This is a collection of utilities for atoms controllers
3#
4import logging
5from milk_server.lib.base import *
6
7def savePageAndRender(pathInfo, template):
8    logging.debug("Saving current page url (%s) - to keep track of atom editor state" %pathInfo)
9    session['currentEditor'] = pathInfo
10    session.save()
11    logging.debug("Now rendering current template (%s)" %template)
12    return render("genshi", template) 
13   
14   
Note: See TracBrowser for help on using the repository browser.