Mercurial > libervia-web
comparison src/pages/g/page_meta.py @ 951:43df2bf38787
pages (g): use language in data for locale
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 21 Jun 2017 08:07:43 +0200 |
parents | 44dde9b955e8 |
children | 5cdd77190a3b |
comparison
equal
deleted
inserted
replaced
950:67a59552f3e3 | 951:43df2bf38787 |
---|---|
73 profile = profile))) | 73 profile = profile))) |
74 sat_session.profile = profile | 74 sat_session.profile = profile |
75 | 75 |
76 # we copy data useful in templates | 76 # we copy data useful in templates |
77 template_data = request.template_data | 77 template_data = request.template_data |
78 for key in (u'name', u'locale'): | 78 if u'name' in data: |
79 if key in data: | 79 template_data[u'name'] = data[u'name'] |
80 template_data[key] = data[key] | 80 if u'language' in data: |
81 template_data[u'locale'] = data[u'language'] | |
81 | 82 |
82 | 83 |
83 def prepare_render(self, request): | 84 def prepare_render(self, request): |
84 template_data = request.template_data | 85 template_data = request.template_data |
85 guest_session = self.host.getSessionData(request, session_iface.ISATGuestSession) | 86 guest_session = self.host.getSessionData(request, session_iface.ISATGuestSession) |