comparison libervia/server/session_iface.py @ 1322:a0954b6610aa

pages: identities are not using `data_objects` anymore: - identities are now handler directly with the dict received from backend, without using a specific data object. - a new `fillMissingIdentities` method in `LiberivaPage` will help to get all needed identities before rendering the template, and to avoid missing avatar or nickname. - (blog/view): fill missing identities for main blog items, not only for comments
author Goffi <goffi@goffi.org>
date Sun, 02 Aug 2020 17:45:15 +0200
parents 334d044f2713
children 822bd0139769
comparison
equal deleted inserted replaced
1321:eb85ef26cb4a 1322:a0954b6610aa
15 15
16 # You should have received a copy of the GNU Affero General Public License 16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 from zope.interface import Interface, Attribute 18 from zope.interface import Interface, Attribute
19 from zope.interface import implementer 19 from zope.interface import implementer
20 from sat.tools.common import data_objects
21 from libervia.server.constants import Const as C 20 from libervia.server.constants import Const as C
22 from libervia.server.classes import Notification 21 from libervia.server.classes import Notification
23 from collections import OrderedDict 22 from collections import OrderedDict
24 import os.path 23 import os.path
25 import shortuuid 24 import shortuuid
45 self.jid = None 44 self.jid = None
46 self.started = time.time() 45 self.started = time.time()
47 # time when the backend session was started 46 # time when the backend session was started
48 self.backend_started = None 47 self.backend_started = None
49 self.uuid = str(shortuuid.uuid()) 48 self.uuid = str(shortuuid.uuid())
50 self.identities = data_objects.Identities() 49 self.identities = {}
51 self.csrf_token = str(shortuuid.uuid()) 50 self.csrf_token = str(shortuuid.uuid())
52 self.locale = None # i18n of the pages 51 self.locale = None # i18n of the pages
53 self.theme = None 52 self.theme = None
54 self.pages_data = {} # used to keep data accross reloads (key is page instance) 53 self.pages_data = {} # used to keep data accross reloads (key is page instance)
55 self.affiliations = OrderedDict() # cache for node affiliations 54 self.affiliations = OrderedDict() # cache for node affiliations