-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#653 Bulk SMS - enable email if user has no phone number (#165)
* send email if user has no phone number * tox fix * removed debugging code * tox migration fix * black migration * black migration
- Loading branch information
1 parent
ddba8a6
commit 851d5d3
Showing
11 changed files
with
201 additions
and
24 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
35 changes: 35 additions & 0 deletions
35
django_project_base/notifications/migrations/0007_auto_20231026_0555.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,35 @@ | ||
# Generated by Django 4.2.4 on 2023-10-26 05:55 | ||
from gettext import gettext | ||
|
||
import swapper | ||
from django.db import migrations | ||
|
||
from django_project_base.constants import USE_EMAIL_IF_RECIPIENT_HAS_NO_PHONE_NUBER | ||
|
||
|
||
def forwards_func(apps, schema_editor): | ||
project_sett = swapper.load_model("django_project_base", "ProjectSettings") | ||
for project in swapper.load_model("django_project_base", "Project").objects.all(): | ||
project_sett.objects.get_or_create( | ||
project=project, | ||
name=USE_EMAIL_IF_RECIPIENT_HAS_NO_PHONE_NUBER, | ||
defaults=dict( | ||
description=gettext("Send notification via EMail if user has no phone number"), | ||
value=False, | ||
value_type="bool", | ||
), | ||
) | ||
|
||
|
||
def reverse_func(apps, schema_editor): | ||
pass | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("notifications", "0006_djangoprojectbasenotification_send_notification_sms"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forwards_func, reverse_func), | ||
] |
17 changes: 17 additions & 0 deletions
17
django_project_base/notifications/migrations/0008_deliveryreport_auxiliary_notification.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,17 @@ | ||
# Generated by Django 4.2.4 on 2023-10-26 06:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("notifications", "0007_auto_20231026_0555"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="deliveryreport", | ||
name="auxiliary_notification", | ||
field=models.UUIDField(null=True, verbose_name="Auxiliary notification"), | ||
), | ||
] |
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
2 changes: 0 additions & 2 deletions
2
example/demo_django_base/migrations/0009_projectsettings_pending_value.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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Generated by Django 4.2.4 on 2023-10-10 06:50 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
|
22 changes: 22 additions & 0 deletions
22
example/demo_django_base/migrations/0010_alter_projectsettings_action_required_and_more.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,22 @@ | ||
# Generated by Django 4.2.4 on 2023-10-26 06:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("demo_django_base", "0009_projectsettings_pending_value"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="projectsettings", | ||
name="action_required", | ||
field=models.BooleanField(blank=True, default=False, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="projectsettings", | ||
name="pending_value", | ||
field=models.CharField(blank=True, max_length=320, null=True, verbose_name="Pending value"), | ||
), | ||
] |