Mercurial > libervia-web
annotate libervia/pages/login/logged/page_meta.py @ 1144:2af117bfe6cc
dates update
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 19 Jan 2019 11:44:49 +0100 |
parents | 28e3eb3bb217 |
children | 29eb15062416 |
rev | line source |
---|---|
963
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 #!/usr/bin/env python2.7 |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 # -*- coding: utf-8 -*- |
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 |
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1102
diff
changeset
|
7 log = getLogger("pages/login") |
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 |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 template = u"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 |