Mercurial > libervia-website
comparison pages/documentation/page_meta.py @ 22:5fd933e238bb
massive refactoring from camelCase -> snake_case. See backend commit log for more details
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 22 May 2023 09:11:54 +0200 |
parents | f47d6ba74a26 |
children | e7c7327f9f25 |
comparison
equal
deleted
inserted
replaced
21:67487063f421 | 22:5fd933e238bb |
---|---|
16 """URL is /[DOC_NAME]""" | 16 """URL is /[DOC_NAME]""" |
17 global allowed_docs | 17 global allowed_docs |
18 template_data = request.template_data | 18 template_data = request.template_data |
19 | 19 |
20 if allowed_docs is None: | 20 if allowed_docs is None: |
21 allowed_docs = sorted(self.getConfig("sub_docs_dict", {}).keys()) | 21 allowed_docs = sorted(self.config_get("sub_docs_dict", {}).keys()) |
22 try: | 22 try: |
23 allowed_docs.remove('backend') | 23 allowed_docs.remove('backend') |
24 except KeyError: | 24 except KeyError: |
25 log.error("backend doc not available") | 25 log.error("backend doc not available") |
26 else: | 26 else: |
27 allowed_docs.insert(0, "backend") | 27 allowed_docs.insert(0, "backend") |
28 try: | 28 try: |
29 doc_name = self.nextPath(request) | 29 doc_name = self.next_path(request) |
30 except IndexError: | 30 except IndexError: |
31 doc_name = 'backend' | 31 doc_name = 'backend' |
32 else: | 32 else: |
33 if doc_name not in allowed_docs: | 33 if doc_name not in allowed_docs: |
34 log.warning(_("unknown doc name: {doc_name}").format(doc_name=doc_name)) | 34 log.warning(_("unknown doc name: {doc_name}").format(doc_name=doc_name)) |