Mercurial > libervia-web
comparison libervia/server/pages.py @ 1390:3e482795630c
pages: implement `getPageData` and `setPageData` helper methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 21:00:21 +0100 |
parents | 21d30f5d582a |
children | e11a71a08a48 |
comparison
equal
deleted
inserted
replaced
1389:ac4173fff71d | 1390:3e482795630c |
---|---|
1616 return request.data | 1616 return request.data |
1617 except AttributeError: | 1617 except AttributeError: |
1618 request.data = {} | 1618 request.data = {} |
1619 return request.data | 1619 return request.data |
1620 | 1620 |
1621 def getPageData(self, request, key): | |
1622 """Helper method to retrieve reload resistant data""" | |
1623 sat_session = self.host.getSessionData(request, session_iface.ISATSession) | |
1624 return sat_session.getPageData(self, key) | |
1625 | |
1626 def setPageData(self, request, key, value): | |
1627 """Helper method to set reload resistant data""" | |
1628 sat_session = self.host.getSessionData(request, session_iface.ISATSession) | |
1629 return sat_session.setPageData(self, key, value) | |
1630 | |
1621 def handleSearch(self, request, extra): | 1631 def handleSearch(self, request, extra): |
1622 """Manage Full-Text Search | 1632 """Manage Full-Text Search |
1623 | 1633 |
1624 Check if "search" query argument is present, and add MAM filter for it if | 1634 Check if "search" query argument is present, and add MAM filter for it if |
1625 necessary. | 1635 necessary. |