Skip to content

Commit

Permalink
Redirect for homepage.
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneycb committed Jul 1, 2019
1 parent 68035f4 commit d2d0f12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions csfieldguide/chapters/urls.py
Expand Up @@ -40,7 +40,7 @@
# eg: redirect /chapters/index.html to /chapters/
url(
r"^index.html$",
RedirectView.as_view(permanent=True, url="/chapters/"),
RedirectView.as_view(permanent=True, pattern_name="chapters:index"),
),
# eg: redirect /chapters/algorithms.html to /chapters/algorithms/
url(
Expand All @@ -50,6 +50,6 @@
# eg: redirect /chapters/algorithms.html#searching to /chapters/algorithms/searching/
url(
r"^(?P<chapter_slug>[-\w]+).html#(?P<chapter_section_slug>[-\w]+)$",
RedirectView.as_view(permanent=True, pattern_name="chapters:chapter:chapter_section"),
RedirectView.as_view(permanent=True, pattern_name="chapters:chapter_section"),
),
]
6 changes: 5 additions & 1 deletion csfieldguide/general/urls.py
Expand Up @@ -4,7 +4,7 @@
from . import views
from django.views.generic.base import RedirectView


app_name = "general"
urlpatterns = [
# e.g. csfieldguide.org.nz/
url(
Expand Down Expand Up @@ -42,4 +42,8 @@
r"^further-information/releases.html$",
RedirectView.as_view(permanent=True, url="https://cs-field-guide.readthedocs.io/en/latest/changelog.html"),
),
url(
r"^index.html$",
RedirectView.as_view(permanent=True, pattern_name="general:index"),
),
]

0 comments on commit d2d0f12

Please sign in to comment.