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

Added 'Active' Events to the Events submenu #2080

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Added 'Active' Events to the Events submenu #2080

merged 1 commit into from
Sep 14, 2023

Conversation

mscanlan-git
Copy link
Contributor

This PR piggybacks off of #2078 where we added an archive submenu for events in the admin console. This pull request continues that work by converting the 'events' tab to an 'active' tab which lists all events that are currently active or have future end dates beyond the current date.

Some other smaller additions:

  • Removed now = timezone.now() and baked it into the .filter()
  • Made function names more consistent across the board (event_active, event_archive)
  • Adjusted URL titles to be event/archive or event/active
  • Updated navbar name to be just 'active' or 'archived'

Copy link
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are good at this @mscanlan-git

@tompollard tompollard merged commit 1a48107 into dev Sep 14, 2023
8 checks passed
@tompollard tompollard deleted the active-events branch September 14, 2023 13:19
@tompollard
Copy link
Member

Probably nothing to worry about, but I think that an event happening "now" will appear both in the active and archived pages.

@mscanlan-git
Copy link
Contributor Author

Thanks, Tom!

think that an event happening "now" will appear both in the active and archived pages.

This is something I considered as well. I suppose doing event_archive = Event.objects.filter(end_date__lt=timezone.now()) for archived events would make more sense, this way any event older than the current date would be filtered out and events that occur on the current date or in the future can be left as event_active. Something to possibly consider in the future, but shouldn't be too problematic unless we had multiple events with the same end date.

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.

2 participants