from django.conf import settings from django.db import models class NotificationPreference(models.Model): user=models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) ntfy_enabled=models.BooleanField(default=False) ntfy_url=models.URLField(blank=True) notify_on_sensor_submission=models.BooleanField(default=True) notify_on_manual_submission=models.BooleanField(default=False)