diff --git a/brutaldon/forms.py b/brutaldon/forms.py index 14c731a..a61c0a3 100644 --- a/brutaldon/forms.py +++ b/brutaldon/forms.py @@ -26,7 +26,8 @@ class PreferencesForm(forms.ModelForm): class Meta: model = Preference fields = ['theme', 'filter_replies', 'filter_boosts', 'timezone', - 'no_javascript', 'notifications', 'click_to_load', 'lightbox', 'poll_frequency'] + 'no_javascript', 'notifications', 'click_to_load', 'lightbox', + 'filter_notifications', 'poll_frequency'] class PostForm(forms.Form): """def status_post(self, status, in_reply_to_id=None, media_ids=None, diff --git a/brutaldon/migrations/0018_preference_filter_notifications.py b/brutaldon/migrations/0018_preference_filter_notifications.py new file mode 100644 index 0000000..741515d --- /dev/null +++ b/brutaldon/migrations/0018_preference_filter_notifications.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.5 on 2019-01-14 13:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('brutaldon', '0017_preference_poll_frequency'), + ] + + operations = [ + migrations.AddField( + model_name='preference', + name='filter_notifications', + field=models.BooleanField(default=False, help_text='Exclude boosts and favs from your notifications.'), + ), + ] diff --git a/brutaldon/models.py b/brutaldon/models.py index 074a144..9ccc06d 100644 --- a/brutaldon/models.py +++ b/brutaldon/models.py @@ -41,6 +41,8 @@ class Preference(models.Model): help_text=_("""Use a JavaScript lightbox to display media.""")) poll_frequency = models.IntegerField(default=300, help_text=_("""Number of seconds to wait between checking notifications. Default: 300""")) + filter_notifications = models.BooleanField(default=False, + help_text=_("""Exclude boosts and favs from your notifications.""")) class Account(models.Model): username = models.EmailField(unique=True) diff --git a/brutaldon/templates/setup/settings.html b/brutaldon/templates/setup/settings.html index 19797b3..9449d2c 100644 --- a/brutaldon/templates/setup/settings.html +++ b/brutaldon/templates/setup/settings.html @@ -85,6 +85,16 @@
++ {{ form.filter_notifications.help_text }} +
+