annotate libervia/pages/login/logged/page_meta.py @ 1346:cda5537c71d6

browser (photos/album): videos integrations: videos can now be added to an album, the alternative media player is then used to display them. Slides options are used to remove pagination and slidebar from slideshow (they don't play well with media player), and video are reset when its slide is exited.
author Goffi <goffi@goffi.org>
date Tue, 25 Aug 2020 08:31:56 +0200
parents f511f8fbbf8a
children ce879da7fcf7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1216
b2d067339de3 python 3 port:
Goffi <goffi@goffi.org>
parents: 1145
diff changeset
1 #!/usr/bin/env python3
1239
f511f8fbbf8a fixed shebangs
Goffi <goffi@goffi.org>
parents: 1216
diff changeset
2
963
2932170bb526 pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff changeset
3
1102
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
4 from libervia.server import session_iface
963
2932170bb526 pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff changeset
5 from sat.core.log import getLogger
1113
cdd389ef97bc server: code style reformatting using black
Goffi <goffi@goffi.org>
parents: 1102
diff changeset
6
1145
29eb15062416 pages: set __name__ for imported pages
Goffi <goffi@goffi.org>
parents: 1124
diff changeset
7 log = getLogger(__name__)
963
2932170bb526 pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff changeset
8
2932170bb526 pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff changeset
9 """SàT log-in page, with link to create an account"""
2932170bb526 pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff changeset
10
1216
b2d067339de3 python 3 port:
Goffi <goffi@goffi.org>
parents: 1145
diff changeset
11 template = "login/logged.html"
1102
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
12
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
13
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
14 def prepare_render(self, request):
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
15 template_data = request.template_data
8b70c838ed14 login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents: 994
diff changeset
16 session_data = self.host.getSessionData(request, session_iface.ISATSession)
1113
cdd389ef97bc server: code style reformatting using black
Goffi <goffi@goffi.org>
parents: 1102
diff changeset
17 template_data["guest_session"] = session_data.guest
cdd389ef97bc server: code style reformatting using black
Goffi <goffi@goffi.org>
parents: 1102
diff changeset
18 template_data["session_started"] = session_data.started