Browse Source

Tree moved to pre environment

master
Dirk Alders 2 months ago
parent
commit
5803286afa
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      pages/page.py

+ 4
- 4
pages/page.py View File

301
             [page_django(self._request, path) for path in full_path_all_pages(expression)]
301
             [page_django(self._request, path) for path in full_path_all_pages(expression)]
302
         )
302
         )
303
         if tree:
303
         if tree:
304
-            return page_tree(pl).html()
304
+            return "<pre>\n" + page_tree(pl).html() + "</pre>\n"
305
         else:
305
         else:
306
             return pl.html_list(depth=depth, filter_str=filter_str, parent_rel_path=parent_rel_path)
306
             return pl.html_list(depth=depth, filter_str=filter_str, parent_rel_path=parent_rel_path)
307
 
307
 
349
 class page_tree(dict):
349
 class page_tree(dict):
350
     T_PATTERN = "├── "
350
     T_PATTERN = "├── "
351
     L_PATTERN = "└── "
351
     L_PATTERN = "└── "
352
-    I_PATTERN = "│   "
353
-    D_PATTERN = "   &nbsp;&nbsp;&nbsp;"
352
+    I_PATTERN = "│   "
353
+    D_PATTERN = "    "
354
 
354
 
355
     def __init__(self, pl: page_list):
355
     def __init__(self, pl: page_list):
356
         super().__init__()
356
         super().__init__()
378
             page = page_wrapped(None, page_path)
378
             page = page_wrapped(None, page_path)
379
             if page.is_available():
379
             if page.is_available():
380
                 entry = f'<a href="{url_page(page_path)}">{entry}</a>'
380
                 entry = f'<a href="{url_page(page_path)}">{entry}</a>'
381
-            rv += fill + (self.L_PATTERN if l == 0 else self.T_PATTERN) + entry + "<br>\n"
381
+            rv += fill + (self.L_PATTERN if l == 0 else self.T_PATTERN) + entry + "\n"
382
             rv += self.html(page_path, fill=fill+(self.D_PATTERN if l == 0 else self.I_PATTERN))
382
             rv += self.html(page_path, fill=fill+(self.D_PATTERN if l == 0 else self.I_PATTERN))
383
         return rv
383
         return rv
384
 
384
 

Loading…
Cancel
Save