Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/unit/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,27 +647,35 @@ def add_redirect_rule(*args, **kwargs):
"sitemap",
"/sitemap/",
"pages/sitemap.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
),
pretend.call(
"help", "/help/", "pages/help.html", view_kw={"has_translations": True}
"help",
"/help/",
"pages/help.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
),
pretend.call(
"security",
"/security/",
"pages/security.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
),
pretend.call(
"sponsors",
"/sponsors/",
"pages/sponsors.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
),
pretend.call(
"trademarks",
"/trademarks/",
"pages/trademarks.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
),
]
Expand Down
15 changes: 13 additions & 2 deletions warehouse/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ def includeme(config):

# Some static, template driven pages
config.add_template_view(
"sitemap", "/sitemap/", "pages/sitemap.html", view_kw={"has_translations": True}
"sitemap",
"/sitemap/",
"pages/sitemap.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
)
config.add_template_view(
"help", "/help/", "pages/help.html", view_kw={"has_translations": True}
"help",
"/help/",
"pages/help.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
)
config.add_template_view(
"security",
"/security/",
"pages/security.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
)
# Redirect the old "sponsor PyPI" page to the sponsors page
Expand All @@ -46,6 +55,7 @@ def includeme(config):
"sponsors",
"/sponsors/",
"pages/sponsors.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
)

Expand All @@ -63,6 +73,7 @@ def includeme(config):
"trademarks",
"/trademarks/",
"pages/trademarks.html",
route_kw={"domain": warehouse},
view_kw={"has_translations": True},
)

Expand Down