Skip to content

Commit

Permalink
Redirect the homepage to the root domain homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Sep 14, 2016
1 parent fe6c280 commit 536ed29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions calaccess_website/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
)
from .other import (
Home,
HomeRedirect,
CalAccess404View,
CalAccessRobotsTxt
)
Expand All @@ -25,6 +26,7 @@

__all__ = (
'Home',
'HomeRedirect',
'CalAccess404View',
'CalAccessModelListMixin',
'CalAccessRobotsTxt',
Expand Down
7 changes: 6 additions & 1 deletion calaccess_website/views/other.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from calaccess_raw.models.tracking import RawDataVersion
from bakery.views import BuildableArchiveIndexView, Buildable404View
from bakery.views import BuildableArchiveIndexView, Buildable404View, BuildableRedirectView


class Home(BuildableArchiveIndexView):
Expand All @@ -12,6 +12,11 @@ class Home(BuildableArchiveIndexView):
template_name = "calaccess_website/home.html"


class HomeRedirect(BuildableRedirectView):
build_path = "index.html"
url = "http://www.californiacivicdata.org/"


class CalAccess404View(Buildable404View):
"""
The 404 page.
Expand Down
2 changes: 1 addition & 1 deletion project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

BUILD_DIR = os.path.join(BASE_DIR, '.build')
BAKERY_VIEWS = (
'calaccess_website.views.Home',
'calaccess_website.views.HomeRedirect',
'calaccess_website.views.VersionArchiveIndex',
'calaccess_website.views.VersionYearArchiveList',
'calaccess_website.views.VersionMonthArchiveList',
Expand Down

0 comments on commit 536ed29

Please sign in to comment.