-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e80bdf
commit cd97d21
Showing
11 changed files
with
73 additions
and
21 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
41 changes: 41 additions & 0 deletions
41
dsmr_notification/migrations/0005_notify_my_android_ended_support.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,41 @@ | ||
# Generated by Django 2.0.5 on 2018-05-24 19:13 | ||
|
||
from django.db import migrations, models | ||
from django.utils.translation import ugettext_lazy | ||
|
||
|
||
def migrate_forward(apps, schema_editor): | ||
NotificationSetting = apps.get_model('dsmr_notification', 'NotificationSetting') | ||
_, _ = NotificationSetting.objects.get_or_create() | ||
|
||
if not NotificationSetting.objects.filter(notification_service='nma').exists(): | ||
return | ||
|
||
# Did we use NMA? Disable it. | ||
NotificationSetting.objects.update(notification_service=None, api_key=None) | ||
|
||
import dsmr_frontend.services | ||
Notification = apps.get_model('dsmr_frontend', 'Notification') | ||
Notification.objects.create( | ||
message=dsmr_frontend.services.get_translated_string(text=ugettext_lazy( | ||
"Notify My Android has terminated their service, the notification settings in DSMR-reader are disabled." | ||
)) | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('dsmr_notification', '0004_statusnotificationsetting'), | ||
] | ||
|
||
operations = [ | ||
# Backwards migration not possible, field was removed before. | ||
migrations.RunPython(migrate_forward), | ||
|
||
migrations.AlterField( | ||
model_name='notificationsetting', | ||
name='notification_service', | ||
field=models.CharField(blank=True, choices=[(None, '--- Disabled ---'), ('prowl', 'Prowl')], default=None, help_text='Which notification service to use for sending daily usage notifications', max_length=20, null=True, verbose_name='Notification service'), | ||
), | ||
] |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
crcmod==1.7 | ||
coreapi==2.3.3 | ||
django==2.0.4 | ||
django==2.0.5 | ||
django-colorfield==0.1.14 | ||
django-debug-toolbar==1.9.1 | ||
django-filter==1.1.0 | ||
djangorestframework==3.8.0 | ||
djangorestframework==3.8.2 | ||
django-solo==1.1.3 | ||
dropbox==8.7.1 | ||
gunicorn==19.7.1 | ||
dropbox==8.8.1 | ||
gunicorn==19.8.1 | ||
paho-mqtt==1.3.1 | ||
pyserial==3.4 | ||
python-dateutil==2.7.2 | ||
pytz==2018.3 | ||
pytz==2018.4 | ||
requests==2.18.4 | ||
urllib3==1.22 |
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,4 @@ | ||
sphinx==1.7.2 | ||
sphinx==1.7.4 | ||
sphinx-autobuild==0.7.1 | ||
sphinx-intl==0.9.11 | ||
sphinx-rtd-theme==0.2.4 | ||
sphinx-rtd-theme==0.3.0 |
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,5 @@ | ||
polib==1.1.0 | ||
pylama==7.4.3 | ||
pytest-cov==2.5.1 | ||
pytest-django==3.1.2 | ||
pytest-django==3.2.1 | ||
pytest-xdist==1.22.2 |
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,2 +1,2 @@ | ||
# For some reason Travis needs to be forced installing this version, or the build pretend like it doesn't know 'pytest'. | ||
pytest==3.5.0 | ||
pytest==3.5.1 |