Browse Source

Enable wiki page routes to handle folders

Currently, there's no way for users to put pages inside folders, but
that can probably be added in the future. This will allow the
~tildes.official wiki to continue working even though some of the pages
have now been moved into folders to match up with the Docs site.
merge-requests/76/merge
Deimos 5 years ago
parent
commit
6fcf5dfdc1
  1. 9
      tildes/tildes/routes.py

9
tildes/tildes/routes.py

@ -45,11 +45,14 @@ def includeme(config: Configurator) -> None:
config.add_route("group_wiki_new_page", "/wiki/new_page", factory=group_by_path)
config.add_route(
"group_wiki_page", "/wiki/{wiki_page_slug}", factory=group_wiki_page_by_slug
"group_wiki_edit_page",
"/wiki/{wiki_page_slug:.*?}/edit",
factory=group_wiki_page_by_slug,
)
config.add_route(
"group_wiki_edit_page",
"/wiki/{wiki_page_slug}/edit",
"group_wiki_page",
"/wiki/{wiki_page_slug:.*}",
factory=group_wiki_page_by_slug,
)

Loading…
Cancel
Save