session.tempfiles is used in qommon
This commit is contained in:
parent
929edd6484
commit
f7fe5ed89f
|
@ -24,6 +24,7 @@ class Session(QuixoteSession, StorableObject):
|
|||
ident_idp_token = None
|
||||
_captcha_tokens = None
|
||||
won_captcha = False
|
||||
tempfiles = None
|
||||
|
||||
username = None # only set on password authentication
|
||||
|
||||
|
@ -36,6 +37,7 @@ class Session(QuixoteSession, StorableObject):
|
|||
self._captcha_tokens or \
|
||||
self.won_captcha or \
|
||||
self.ident_idp_token or \
|
||||
self.tempfiles or \
|
||||
QuixoteSession.has_info(self)
|
||||
is_dirty = has_info
|
||||
|
||||
|
|
|
@ -6,12 +6,10 @@ from qommon.sessions import Session
|
|||
class BasicSession(Session):
|
||||
|
||||
anonymous_key = None
|
||||
tempfiles = None
|
||||
magictokens = None
|
||||
|
||||
def has_info(self):
|
||||
return self.anonymous_key or self.tempfiles or \
|
||||
self.magictokens or Session.has_info(self)
|
||||
return self.anonymous_key or self.magictokens or Session.has_info(self)
|
||||
is_dirty = has_info
|
||||
|
||||
def get_anonymous_key(self, generate = False):
|
||||
|
@ -32,4 +30,4 @@ class BasicSession(Session):
|
|||
return self.magictokens.get(token, default)
|
||||
|
||||
qommon.sessions.BasicSession = BasicSession
|
||||
StorageSessionManager = qommon.sessions.StorageSessionManager
|
||||
StorageSessionManager = qommon.sessions.éStorageSessionManager
|
||||
|
|
Loading…
Reference in New Issue