Skip to content

Commit 7de4d95

Browse files
benjaomingstsewd
andauthored
Proxito: Search scope narrowed to active project (version, translation or subproject 404s) (#10324)
* Search scope narrowed to active project when version, translation or subproject not found * Update readthedocs/proxito/views/serve.py Co-authored-by: Santos Gallegos <[email protected]> --------- Co-authored-by: Santos Gallegos <[email protected]>
1 parent 040c787 commit 7de4d95

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

readthedocs/proxito/views/serve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ def get_using_unresolver(self, request, path):
848848
if response:
849849
return response
850850

851-
# No custom 404 page, use our contextualized 404 response
851+
# Don't use the custom 404 page, use our general contextualized 404 response
852852
# Several additional context variables can be added if the templates
853853
# or other error handling is developed (version, language, filename).
854854
raise contextualized_404_class(

readthedocs/templates/errors/404/no_language.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
{% block 404_error_message %}
77
{% include "errors/404/include_error_message.html" %}
8-
{% include "errors/404/include_search.html" %}
8+
{% include "errors/404/include_search.html" with search_project=project.slug %}
99
{% include "errors/404/include_tips.html" %}
1010
{% endblock %}

readthedocs/templates/errors/404/no_subproject.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
{% block 404_error_message %}
77
{% include "errors/404/include_error_message.html" %}
8-
{% include "errors/404/include_search.html" %}
8+
{% include "errors/404/include_search.html" with search_project=project.slug %}
99
{% include "errors/404/include_tips.html" %}
1010
{% endblock %}

readthedocs/templates/errors/404/no_version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
{% block 404_error_message %}
77
{% include "errors/404/include_error_message.html" %}
8-
{% include "errors/404/include_search.html" %}
8+
{% include "errors/404/include_search.html" with search_project=project.slug %}
99
{% include "errors/404/include_tips.html" %}
1010
{% endblock %}

0 commit comments

Comments
 (0)