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

Add ability to show banner announcements #513

Merged
merged 10 commits into from
Mar 22, 2024
Merged

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Mar 22, 2024

  • Use the django-constance app to add settings that can be edited in the admin
  • Add a SITE_ANNOUNCEMENT setting
  • If SITE_ANNOUNCEMENT is non-blank, show an alert with the text of the site announcement

amstilp added 10 commits March 21, 2024 11:23
I can't run pip-compile since the macports MariaDB ports are broken
due to a change in libxml2, so I manually edited the requirements.txt
file. Not ideal.
Add django-constance to the third party apps section, and set the
specific required settings for this app. We'll use the database
backend for now, since we aren't using redis.
This isn't working locally - maybe we can enable it in prod later.
This was causing the ACM navbar to be much bigger than it needed
to be.
This is not documented, but appears to be required:
jazzband/django-constance#526
Add the ANNOUNCEMENT_TEXT setting to constance with the default as
a blank string: "". If the setting is set to a non-blank string,
then show an alert with the announcement. Otherwise, do not show any
alert. Add tests.
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (1a713f0) to head (00a7fe9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #513   +/-   ##
=======================================
  Coverage   98.66%   98.67%           
=======================================
  Files         291      291           
  Lines       22773    22801   +28     
=======================================
+ Hits        22470    22498   +28     
  Misses        303      303           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amstilp amstilp marked this pull request as ready for review March 22, 2024 16:02
@amstilp amstilp merged commit 92cbbcb into main Mar 22, 2024
8 checks passed
@amstilp amstilp deleted the feature/banner-announcement branch March 22, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant