Persist into the session the request the session the currently selected theme
This commit is contained in:
parent
2ee2619455
commit
a9855ba738
|
@ -1,5 +1,5 @@
|
|||
from qommon import get_cfg, get_logger
|
||||
from quixote import redirect
|
||||
from quixote import redirect, get_session
|
||||
from authentic.form import *
|
||||
from quixote.html import htmltext
|
||||
import qommon.errors as errors
|
||||
|
@ -53,6 +53,14 @@ def check_classification(classification):
|
|||
class IfefRootDirectory(authentic.root.RootDirectory):
|
||||
_q_exports = authentic.root.RootDirectory._q_exports + [ 'register2' ]
|
||||
|
||||
def _q_traverse(self, path):
|
||||
request = get_request()
|
||||
if request.form and request.form.get('service'):
|
||||
service = request.form['service']
|
||||
get_session().service = service
|
||||
request.service = service
|
||||
return super(IfefRootDirectory, self)._q_traverse(path)
|
||||
|
||||
def register2 (self):
|
||||
return self.register(version=2)
|
||||
|
||||
|
|
Reference in New Issue