Skip to content

Commit db6470d

Browse files
committed
Merge branch 'master' into create_project_publish_improvements
2 parents fe898e7 + 3659c60 commit db6470d

File tree

7 files changed

+5
-13
lines changed

7 files changed

+5
-13
lines changed

civictechprojects/sitemaps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class SectionSitemap(Sitemap):
1616
str(FrontEndSection.AboutUs.value),
1717
str(FrontEndSection.FindProjects.value),
1818
str(FrontEndSection.Donate.value),
19-
str(FrontEndSection.Press.value),
2019
str(FrontEndSection.ContactUs.value),
2120
str(FrontEndSection.Companies.value)
2221
]

common/components/chrome/MainFooter.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const sectionsToShowFooter: $ReadOnlyArray<string> = [
1414
Section.FindProjects,
1515
Section.AboutProject,
1616
Section.AboutUs,
17-
Section.Press,
1817
Section.Home,
1918
];
2019

common/components/chrome/MainHeader.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ class MainHeader extends React.Component<{||}, State> {
132132
urlHelper.section(Section.ContactUs),
133133
"Contact Us"
134134
)}
135-
{this._renderNavDropdownItem(
136-
urlHelper.section(Section.Press),
137-
"News"
138-
)}
139135
</NavDropdown>
140136
{window.BLOG_URL ? (
141137
<Nav.Link href={window.BLOG_URL}>Blog</Nav.Link>

common/components/controllers/SectionController.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import EmailVerifiedController from "./EmailVerifiedController.jsx";
2424
import FlashMessage from "../chrome/FlashMessage.jsx";
2525
import DonateController from "./DonateController.jsx";
2626
import ThankYouController from "./ThankYouController.jsx";
27-
import PressController from "./PressController.jsx";
2827
import ContactUsController from "./ContactUsController.jsx";
2928
import CreateGroupController from "./CreateGroupController.jsx";
3029
import CreateEventController from "./CreateEventController.jsx";
@@ -105,8 +104,6 @@ class SectionController extends React.Component<{||}, State> {
105104
return <DonateController />;
106105
case Section.ThankYou:
107106
return <ThankYouController />;
108-
case Section.Press:
109-
return <PressController />;
110107
case Section.ContactUs:
111108
return <ContactUsController />;
112109
case Section.CreateGroup:

common/components/enums/Section.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const Section = {
2020
EmailVerified: "EmailVerified",
2121
Donate: "Donate",
2222
ThankYou: "ThankYou",
23-
Press: "Press",
2423
ContactUs: "ContactUs",
2524
CreateGroup: "CreateGroup",
2625
CreateEvent: "CreateEvent",

common/helpers/constants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class FrontEndSection(Enum):
2323
AboutUs = 'AboutUs'
2424
FindProjects = 'FindProjects'
2525
Donate = 'Donate'
26-
Press = 'Press'
2726
ContactUs = 'ContactUs'
2827
Home = "Home"
2928
CreateProject = 'CreateProject'
@@ -49,7 +48,7 @@ class FrontEndSection(Enum):
4948
# deprecated
5049
CorporateHackathon = 'CorporateHackathon'
5150
PartnerWithUs = 'PartnerWithUs'
52-
51+
Press = 'Press'
5352

5453
deprecated_page_redirects = {
5554
'CorporateEvent': FrontEndSection.Companies.value,

common/helpers/front_end.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.conf import settings
33
from html import unescape
44
from urllib import parse as urlparse
5-
from .constants import deprecated_page_redirects
5+
from .constants import deprecated_page_redirects, FrontEndSection
66
from common.helpers.dictionaries import keys_omit
77

88

@@ -88,5 +88,8 @@ def get_clean_url(url):
8888

8989

9090
def redirect_from_deprecated_url(section_name):
91+
# Redirect deprecated Press section
92+
if section_name == FrontEndSection.Press.value:
93+
return settings.BLOG_URL
9194
if section_name in deprecated_page_redirects:
9295
return section_url(deprecated_page_redirects[section_name])

0 commit comments

Comments
 (0)