|
3 | 3 | """ |
4 | 4 |
|
5 | 5 | from framework.routing import Rule, json_renderer |
6 | | -from website.routes import OsfWebRenderer |
7 | 6 |
|
8 | 7 | from . import views |
9 | 8 |
|
10 | | -TEMPLATE_DIR = './addons/wiki/templates/' |
11 | | - |
12 | 9 | settings_routes = { |
13 | 10 | 'rules': [], |
14 | 11 | 'prefix': '/api/v1', |
15 | 12 | } |
16 | 13 |
|
17 | 14 | # NOTE: <wname> refers to a wiki page's key, e.g. 'Home' |
| 15 | +# All HTML-rendered wiki routes have been removed; only API routes remain. |
18 | 16 | page_routes = { |
19 | | - |
20 | | - 'rules': [ |
21 | | - |
22 | | - # Home (Base) | GET |
23 | | - Rule( |
24 | | - [ |
25 | | - '/project/<pid>/wiki/', |
26 | | - '/project/<pid>/node/<nid>/wiki/', |
27 | | - ], |
28 | | - 'get', |
29 | | - views.project_wiki_home, |
30 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
31 | | - ), |
32 | | - |
33 | | - # View (ID) | GET |
34 | | - Rule( |
35 | | - [ |
36 | | - '/project/<pid>/wiki/id/<wid>/', |
37 | | - '/project/<pid>/node/<nid>/wiki/id/<wid>/', |
38 | | - ], |
39 | | - 'get', |
40 | | - views.project_wiki_id_page, |
41 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
42 | | - ), |
43 | | - |
44 | | - # Wiki | GET |
45 | | - Rule( |
46 | | - [ |
47 | | - '/project/<pid>/wiki/<wname>/', |
48 | | - '/project/<pid>/node/<nid>/wiki/<wname>/', |
49 | | - ], |
50 | | - 'get', |
51 | | - views.project_wiki_view, |
52 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
53 | | - ), |
54 | | - |
55 | | - # Edit | GET (legacy url, trigger redirect) |
56 | | - Rule( |
57 | | - [ |
58 | | - '/project/<pid>/wiki/<wname>/edit/', |
59 | | - '/project/<pid>/node/<nid>/wiki/<wname>/edit/', |
60 | | - ], |
61 | | - 'get', |
62 | | - views.project_wiki_edit, |
63 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
64 | | - ), |
65 | | - |
66 | | - # Compare | GET (legacy url, trigger redirect) |
67 | | - Rule( |
68 | | - [ |
69 | | - '/project/<pid>/wiki/<wname>/compare/<int:wver>/', |
70 | | - '/project/<pid>/node/<nid>/wiki/<wname>/compare/<int:wver>/', |
71 | | - ], |
72 | | - 'get', |
73 | | - views.project_wiki_compare, |
74 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
75 | | - ), |
76 | | - |
77 | | - # Edit | POST |
78 | | - Rule( |
79 | | - [ |
80 | | - '/project/<pid>/wiki/<wname>/', |
81 | | - '/project/<pid>/node/<nid>/wiki/<wname>/', |
82 | | - ], |
83 | | - 'post', |
84 | | - views.project_wiki_edit_post, |
85 | | - OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR) |
86 | | - ), |
87 | | - ] |
| 17 | + 'rules': [], |
88 | 18 | } |
89 | 19 |
|
90 | 20 | api_routes = { |
|
0 commit comments