mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Implement 'send_email_alerts'
* cascading from team to project; user is base-level-default * implemented at form-level * implemented when emails are actually sent
This commit is contained in:
18
users/migrations/0003_user_send_email_alerts.py
Normal file
18
users/migrations/0003_user_send_email_alerts.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-06-12 14:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0002_emailverification'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='send_email_alerts',
|
||||
field=models.BooleanField(blank=True, default=True),
|
||||
),
|
||||
]
|
||||
@@ -10,6 +10,13 @@ class User(AbstractUser):
|
||||
# > User model is sufficient for you. This model behaves identically to the default user model, but you’ll be able
|
||||
# > to customize it in the future if the need arises
|
||||
|
||||
# (The above is no longer the only reason for a custom User model, since we started introducing custom fields.
|
||||
# Regarding those fields, there is some pressure in the docs to put UserProfile fields in a separate model, but
|
||||
# as long as the number of fields is small I think the User model makes more sense. We can always push them out
|
||||
# later)
|
||||
|
||||
send_email_alerts = models.BooleanField(default=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'auth_user'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user