Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit for projects section fix #1017

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
93cc0a4
Bump redis from 3.5.3 to 4.3.6
dependabot[bot] Mar 27, 2023
33fbbde
First Solution
Workhqd May 10, 2023
b7f4100
Bump django from 4.2 to 4.2.3
dependabot[bot] Jul 11, 2023
329a943
Bump requests from 2.28.2 to 2.31.0
dependabot[bot] Jul 12, 2023
dfc83cd
Bump semver from 5.7.1 to 5.7.2
dependabot[bot] Jul 12, 2023
cc95234
remove react-helmet
QuanGiap Aug 10, 2023
0a07de3
Initial commit for projects section fix
ashwin-sp Aug 16, 2023
22c6054
Update comment
QuanGiap Aug 16, 2023
ac233d6
Change code base on Peter suggestion
QuanGiap Aug 18, 2023
2ed0168
FA preconnect and Google font chain reduction
PeterBreen Oct 3, 2023
ca59222
Merge pull request #952 from DemocracyLab/dependabot/pip/redis-4.3.6
marlonkeating Oct 24, 2023
9ab1f92
Merge pull request #1003 from DemocracyLab/dependabot/pip/django-4.2.3
marlonkeating Oct 24, 2023
3a25e81
Merge pull request #1004 from DemocracyLab/dependabot/pip/requests-2.…
marlonkeating Oct 24, 2023
28f154b
Merge pull request #1005 from DemocracyLab/dependabot/npm_and_yarn/se…
marlonkeating Oct 24, 2023
174b63d
Resolve word-wrap to 1.2.4
marlonkeating Oct 24, 2023
d3f6b9a
Merge branch 'master' into projects_search_section_fix
ashwin-sp Oct 27, 2023
02fa7e3
Merge pull request #1049 from DemocracyLab/peter/loadfonts2
marlonkeating Oct 29, 2023
0af5905
Merge pull request #971 from DemocracyLab/Try696-clicking-back-from-s…
marlonkeating Oct 29, 2023
2da397a
gtags added to companies page
ddfridley Oct 31, 2023
5c0d7d3
Resolve browserify-sign to 4.2.2
marlonkeating Nov 1, 2023
95c2cb0
Merge branch 'master' into 495-render-all-page-headers-on-backend-rem…
QuanGiap Nov 1, 2023
ecb25ed
remove react-helmet
QuanGiap Nov 1, 2023
53978c5
Merge pull request #1018 from DemocracyLab/495-render-all-page-header…
marlonkeating Nov 2, 2023
5fc771d
remove references to EMAIL_HOST_PASSWORD
Nov 6, 2023
e174261
Merge pull request #1058 from DemocracyLab/sprint-95-release
marlonkeating Nov 7, 2023
e32f769
can not dummy gtag
ddfridley Nov 7, 2023
49c68f9
safeGtag
ddfridley Nov 7, 2023
ea01214
Merge remote-tracking branch 'origin/master' into gtag#1034
ddfridley Nov 7, 2023
b86c146
CSP updates for hotjar
ddfridley Nov 7, 2023
b02d4de
Merge pull request #1067 from DemocracyLab/gtag#1034
marlonkeating Nov 12, 2023
f443329
Merge pull request #1068 from DemocracyLab/hotjar#1033
marlonkeating Nov 12, 2023
af39032
Merge pull request #1063 from DemocracyLab/remove_email_host
marlonkeating Nov 12, 2023
99b12aa
Merge pull request #1071 from DemocracyLab/sprint-96-release
marlonkeating Nov 20, 2023
a6f5297
Initial commit for projects section fix
ashwin-sp Aug 16, 2023
dfa1774
Merge local with remote
ashwin-sp Dec 19, 2023
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.8
python: python3.11.4
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
Expand Down
3 changes: 0 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"AWS_SECRET_ACCESS_KEY": {
"required": true
},
"EMAIL_HOST_PASSWORD": {
"required": true
},
"S3_BUCKET": {
"required": true
},
Expand Down
61 changes: 56 additions & 5 deletions civictechprojects/helpers/context_preload.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def about_project_preload(context, request):
print('Failed to preload project info, no cache entry found: ' + project_id)
return context


def about_event_preload(context, request):
context = default_preload(context, request)
query_args = url_params(request)
Expand Down Expand Up @@ -79,14 +78,14 @@ def about_group_preload(context, request):

def companies_preload(context, request):
context = default_preload(context, request)
context['title'] = 'DemocracyLab | Corporate Engagement'
context['title'] = 'Corporate Engagement | DemocracyLab'
context['description'] = 'Do well by doing good! Engage employees at custom events to build culture and spark innovation. Differentiate your brand by sponsoring our public hackathons.'
return context


def about_us_preload(context, request):
context = default_preload(context, request)
context['title'] = 'DemocracyLab | About'
context['title'] = 'About | DemocracyLab'
context['description'] = 'Learn About democracyLab, the nonprofit connecting skilled individuals to tech-for-good projects.'
return context

Expand All @@ -111,20 +110,47 @@ def create_event_preload(context, request):
context['description'] = 'Create event page'
return context

def create_group_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Create a Group | DemocracyLab'
context['description'] = 'Create group page'
return context

def create_project_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Create a Project | DemocracyLab'
context['description'] = 'Create project page'
return context

def my_projects_preload(context, request):
context = default_preload(context, request)
context['title'] = 'My Projects | DemocracyLab'
context['description'] = 'My Projects page'
return context


def my_groups_preload(context, request):
context = default_preload(context, request)
context['title'] = 'My Groups | DemocracyLab'
context['description'] = 'My Groups page'
return context

def find_events_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Find Events | DemocracyLab'
context['description'] = 'Optimizing the connection between skilled volunteers and tech-for-good events'
return context

def find_groups_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Find Groups | DemocracyLab'
context['description'] = 'Optimizing the connection between skilled volunteers and tech-for-good groups'
return context

def find_projects_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Find Projects | DemocracyLab'
context['description'] = 'Optimizing the connection between skilled volunteers and tech-for-good projects'
return context

def my_events_preload(context, request):
context = default_preload(context, request)
Expand All @@ -144,6 +170,23 @@ def terms_preload(context, request):
context['description'] = 'Terms of Use page'
return context

def sign_up_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Sign Up | DemocracyLab'
context['description'] = 'Sign up'
return context

def contact_us_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Contact Us | DemocracyLab'
context['description'] = 'Contact information for DemocracyLab.'
return context

def reset_password_preload(context, request):
context = default_preload(context, request)
context['title'] = 'Reset Password | DemocracyLab'
context['description'] = 'Reset password page'
return context

def videos_preload(context, request):
context = default_preload(context, request)
Expand Down Expand Up @@ -182,6 +225,8 @@ def default_preload(context, request):
{'section': FrontEndSection.EditProfile.value, 'handler': edit_profile_preload},
{'section': FrontEndSection.AboutUs.value, 'handler': about_us_preload},
{'section': FrontEndSection.CreateEvent.value, 'handler': create_event_preload},
{'section': FrontEndSection.CreateGroup.value,'handler':create_group_preload},
{'section': FrontEndSection.CreateProject.value,'handler':create_project_preload},
{'section': FrontEndSection.MyProjects.value, 'handler': my_projects_preload},
{'section': FrontEndSection.MyGroups.value, 'handler': my_groups_preload},
{'section': FrontEndSection.MyEvents.value, 'handler': my_events_preload},
Expand All @@ -191,7 +236,13 @@ def default_preload(context, request):
{'section': FrontEndSection.VideoOverview.value, 'handler': videos_preload},
{'section': FrontEndSection.AboutEventProject.value, 'handler': about_event_project_preload},
{'section': FrontEndSection.Privacy.value, 'handler': privacy_preload},
{'section': FrontEndSection.Terms.value, 'handler': terms_preload}
{'section': FrontEndSection.Terms.value, 'handler': terms_preload},
{'section': FrontEndSection.SignUp.value, 'handler': sign_up_preload},
{'section': FrontEndSection.ContactUs.value,'handler':contact_us_preload},
{'section': FrontEndSection.ResetPassword.value,'handler':reset_password_preload},
{'section': FrontEndSection.FindEvents.value,'handler':find_events_preload},
{'section': FrontEndSection.FindGroups.value,'handler':find_groups_preload},
{'section': FrontEndSection.FindProjects.value,'handler':find_projects_preload},
]


Expand Down
Loading