2458 introduced some nice centralized logic for event registration status, but it's not used everywhere yet; for example it is not used for event cards like on the front page. We should implement this in those places too.
Motivation
By doing this we will reduce duplicate logic in our codebase.
Current implementation
Right now we implement the status detection logic separately in multiple places.
Suggested implementation
Use the centralized logic defined in website/events/models/status.py and website/events/services.py.
Additional context
It is useful to look for e.g. is_user_registered and other things that indicate that the event status is used. We should use registration_status instead.
Describe the change
2458 introduced some nice centralized logic for event registration status, but it's not used everywhere yet; for example it is not used for event cards like on the front page. We should implement this in those places too.
Motivation
By doing this we will reduce duplicate logic in our codebase.
Current implementation
Right now we implement the status detection logic separately in multiple places.
Suggested implementation
Use the centralized logic defined in
website/events/models/status.py
andwebsite/events/services.py
.Additional context
It is useful to look for e.g.
is_user_registered
and other things that indicate that the event status is used. We should useregistration_status
instead.