Skip to content

Commit f298efe

Browse files
authored
New dashboard: delete legacy HTML templates (part 3) (#12200)
Continue the work from: * #12197
1 parent fe29275 commit f298efe

39 files changed

+8
-824
lines changed

readthedocs/proxito/exceptions.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ def __init__(self, domain, **kwargs):
6161
super().__init__(**kwargs)
6262

6363

64+
# All the following exceptions use the same template from ext-theme.
65+
# That template uses `not_found_subject` as a heading and copy of the page,
66+
# the rest of the page is exactly the same.
67+
# This can be tested by using `DEBUG = False` in El Proxito.
6468
class ProjectHttp404(ContextualizedHttp404):
6569
"""
6670
Raised if a domain did not resolve to a project.
@@ -86,7 +90,7 @@ def __init__(self, domain, **kwargs):
8690
class SubprojectHttp404(ContextualizedHttp404):
8791
"""Raised if a subproject was not found."""
8892

89-
template_name = "errors/proxito/404/no_subproject.html"
93+
template_name = "errors/proxito/404/no_project.html"
9094
not_found_subject = pgettext_lazy("Names an object not found in a 404 error", "subproject")
9195

9296
def __init__(self, project, **kwargs):
@@ -103,7 +107,7 @@ def __init__(self, project, **kwargs):
103107
class ProjectFilenameHttp404(ContextualizedHttp404):
104108
"""Raised if a page inside an existing project was not found."""
105109

106-
template_name = "errors/proxito/404/no_project_page.html"
110+
template_name = "errors/proxito/404/no_project.html"
107111
not_found_subject = pgettext_lazy(_not_found_subject_translation_context, "documentation page")
108112

109113
def __init__(self, project, **kwargs):
@@ -125,7 +129,7 @@ class ProjectTranslationHttp404(ContextualizedHttp404):
125129
If a page isn't found, raise a ProjectPageHttp404.
126130
"""
127131

128-
template_name = "errors/proxito/404/no_language.html"
132+
template_name = "errors/proxito/404/no_project.html"
129133
not_found_subject = pgettext_lazy("Names an object not found in a 404 error", "translation")
130134

131135
def __init__(self, project, **kwargs):
@@ -146,7 +150,7 @@ class ProjectVersionHttp404(ContextualizedHttp404):
146150
Note: The containing project can be a subproject.
147151
"""
148152

149-
template_name = "errors/proxito/404/no_version.html"
153+
template_name = "errors/proxito/404/no_project.html"
150154
not_found_subject = pgettext_lazy(
151155
_not_found_subject_translation_context, "documentation version"
152156
)

readthedocs/templates/errors/base.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/401.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/403.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

readthedocs/templates/errors/dashboard/404.html

Lines changed: 0 additions & 46 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/429.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/4xx.html

Lines changed: 0 additions & 20 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/500.html

Lines changed: 0 additions & 20 deletions
This file was deleted.

readthedocs/templates/errors/dashboard/5xx.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

readthedocs/templates/errors/dashboard/base.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)