Bases: object
A simple temporary session object which simple stores session data.
This class will later be removed, it is here because we need a login window for the Qt user interfaces.
On initialize it will load the SessionData from the users .strc folder
Methods
| __init__() | |||||
| datetime_to_millis(dt) | Default JSON serializer for datetime objects. | ||||
| default_json_serializer(obj) | default serializer for json data | ||||
| delete() | removes the cache file | ||||
| load() | loads the data from the saved local session | ||||
| millis_to_datetime(millis) |
|
||||
| save() | remembers the data in user local file system | ||||
| session_file_full_path() |
|
||||
| store_user(user) | stores the given user instance | ||||
Attributes
| logged_in_user | returns the logged in user |
Default JSON serializer for datetime objects.
code is based on the answer of Jay Taylor in http://stackoverflow.com/questions/11875770/how-to-overcome-datetime-datetime-not-json-serializable-in-python
| Parameters: | dt – datetime.datetime instance |
|---|