Mercurial > libervia-web
comparison libervia/server/pages.py @ 1378:e3e303a30a74
pages (tickets): renamed "tickets" to "lists":
"lists" is more generic, and tickets is actually a specific kind of list.
/!\ "tickets_trackers_json" option has been renamed to "lists_directory_json".
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 28 Jan 2021 18:51:44 +0100 |
parents | 1b94a5ab155f |
children | df79874947d7 |
comparison
equal
deleted
inserted
replaced
1377:46ce79eac754 | 1378:e3e303a30a74 |
---|---|
724 except AttributeError: | 724 except AttributeError: |
725 # LiberviaPages have a name, but maybe this is an other Resource | 725 # LiberviaPages have a name, but maybe this is an other Resource |
726 continue | 726 continue |
727 if child_name == subpage_name: | 727 if child_name == subpage_name: |
728 return path.decode('utf-8'), child | 728 return path.decode('utf-8'), child |
729 raise exceptions.NotFound(_("requested sub page has not been found")) | 729 raise exceptions.NotFound( |
730 _("requested sub page has not been found ({subpage_name})").format( | |
731 subpage_name=subpage_name)) | |
730 | 732 |
731 def getSubPageURL(self, request, page_name, *args): | 733 def getSubPageURL(self, request, page_name, *args): |
732 """retrieve a page in direct children and build its URL according to request | 734 """retrieve a page in direct children and build its URL according to request |
733 | 735 |
734 request's current path is used as base (at current parsing point, | 736 request's current path is used as base (at current parsing point, |
1784 self._cacheURL(request, profile) | 1786 self._cacheURL(request, profile) |
1785 else: | 1787 else: |
1786 log.debug(f"using URI cache for {self}") | 1788 log.debug(f"using URI cache for {self}") |
1787 cache_url.use(request) | 1789 cache_url.use(request) |
1788 else: | 1790 else: |
1789 await asDeferred(self.parse_url, self, request) | 1791 try: |
1792 await asDeferred(self.parse_url, self, request) | |
1793 except Exception as e: | |
1794 __import__('pudb').set_trace() | |
1795 print(e) | |
1790 | 1796 |
1791 self._subpagesHandler(request) | 1797 self._subpagesHandler(request) |
1792 | 1798 |
1793 if request.method not in (C.HTTP_METHOD_GET, C.HTTP_METHOD_POST): | 1799 if request.method not in (C.HTTP_METHOD_GET, C.HTTP_METHOD_POST): |
1794 # only HTTP GET and POST are handled so far | 1800 # only HTTP GET and POST are handled so far |