-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check if people are still studying (#3729)
* Add new boolean field for study long members * Add only honorary members can get until is None * Add new form for membership extensions * Fix clean function of membership to only allow Honorary members to get an until equal to None * Add task for study long experation notification * Add start for function for the notification of study long members * Add start email * Add email for study long check * Change some services logic * Add a view and template * Oops? * Fix renewal form view * Add url for study long renewal * Add form in a way that makes dirk angry * Add form functionality to new year renewal form * Add migration * Add succes page for studylong renewal * Fix the template of the study long renewal page * Add some messages * Remove faulty redirect * Fix the not_member announcement * Prevent studylong member to make normal registration * Fix normal registration template * Fix some services tests * Remove not needed email test * Add study_long check on normal renewal form * Fix mistakes in services * Remove print statment * Add tests for study long renewal view * Fix the renewal view * Add privacy link to form * Fix view test of the renewal form * Fix some logical mistakes made * Fix services tests * Add logic of when someone cannot have a study long renewal entry * Add new year form tests * Add extra check for honorary members * Add test for the NewYearForm * Add some service tests * Fix the fixtures * Remove wrong task * Fix celery beat schedule * Add manual migrations for the current until of study_long people. * Fix migration 0051 * Remove redundant templates * Add expiration reminder * Fix migration * Fix fixture * Fix membership expiration banner * Add more information to email * Add some docs for registration * Small textual changes and some small fixes * Fix typo * Fix some email stuff * Fix email template texts * Fix registration * Revert dirks change since it breaks the announcement banner for study_long members * Fix Honorary entries being study long * Fix not needed context being added * Fix accidentally committed too soon * Fix benefactorers can have membership until end of study * fix first sentence of email --------- Co-authored-by: Dirk Doesburg <[email protected]>
- Loading branch information
Showing
31 changed files
with
575 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 5.0.7 on 2024-10-30 17:59 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("members", "0049_alter_membership_since"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="membership", | ||
name="study_long", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Whether the member has paid to be member throughout their studies.", | ||
verbose_name="Study long", | ||
), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
website/members/migrations/0051_membership_study_long_until.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import datetime | ||
from django.utils import timezone | ||
from django.db import migrations, models | ||
|
||
|
||
def change_until(apps, schema_editor): | ||
Membership = apps.get_model("members", "Membership") | ||
|
||
new_until = datetime.datetime( | ||
year=timezone.now().year, month=9, day=1 | ||
) + datetime.timedelta(days=365) | ||
|
||
Membership.objects.filter(until=None, type="member").update( | ||
study_long=True, until=new_until.date() | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("members", "0050_membership_study_long"), | ||
] | ||
operations = [ | ||
migrations.RunPython(change_until, elidable=True), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
website/members/templates/members/announcement_not_member.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<p> | ||
<i class="fas fa-id-card me-2"></i> | ||
You're currently not a member of Thalia. <a href="{% url 'registrations:renew' %}">Renew your membership</a> to get access to all parts of the website. | ||
{% if member.latest_membership.study_long and not member.profile.is_minimized %} | ||
You're currently not a member of Thalia. <a href="{% url 'registrations:renew-studylong' %}">Extend your membership</a> if you are still studying and get access to all parts of the website. | ||
{% else %} | ||
You're currently not a member of Thalia. <a href="{% url 'registrations:renew' %}">Renew your membership</a> to get access to all parts of the website. | ||
{% endif %} | ||
</p> |
12 changes: 0 additions & 12 deletions
12
website/members/templates/members/email/membership_announcement.html
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
website/members/templates/members/email/membership_announcement.txt
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
website/members/templates/members/email/membership_announcement_notification.html
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
website/members/templates/members/email/membership_announcement_notification.txt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.