Mercurial > libervia-web
annotate src/pages/login/logged/page_meta.py @ 1104:9313bcbe45b7
[mq]: debug_avatar_forum
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Jun 2018 08:03:10 +0200 |
parents | 8b70c838ed14 |
children | cdd389ef97bc |
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 |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 log = getLogger('pages/login') |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 """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
|
9 |
2932170bb526
pages: added login/logged and register pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 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
|
11 |
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 def prepare_render(self, request): |
8b70c838ed14
login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents:
994
diff
changeset
|
14 template_data = request.template_data |
8b70c838ed14
login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents:
994
diff
changeset
|
15 session_data = self.host.getSessionData(request, session_iface.ISATSession) |
8b70c838ed14
login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents:
994
diff
changeset
|
16 template_data['guest_session'] = session_data.guest |
8b70c838ed14
login (logged): set guest_session and session_started template variables
Goffi <goffi@goffi.org>
parents:
994
diff
changeset
|
17 template_data['session_started'] = session_data.started |