- all_questions = forms.BooleanField(required=False, initial=False)
- all_questions_watched_tags = forms.BooleanField(required=False, initial=False)
- questions_asked = forms.BooleanField(required=False, initial=False)
- questions_answered = forms.BooleanField(required=False, initial=False)
- questions_commented = forms.BooleanField(required=False, initial=False)
- questions_viewed = forms.BooleanField(required=False, initial=False)
-
- notify_answers = forms.BooleanField(required=False, initial=False)
- notify_reply_to_comments = forms.BooleanField(required=False, initial=False)
- notify_comments_own_post = forms.BooleanField(required=False, initial=False)
- notify_comments = forms.BooleanField(required=False, initial=False)
- notify_accepted = forms.BooleanField(required=False, initial=False)
+ class Meta:
+ model = SubscriptionSettings
+ fields = ['enable_notifications', 'member_joins', 'new_question', 'new_question_watched_tags', 'subscribed_questions']
+
+class UserPreferencesForm(forms.Form):
+ sticky_sorts = forms.BooleanField(required=False, initial=False)
+
+