feat: replace email flows with in-app notifications
Add recipient notification detail and filtering, a queued admin composer, and contextual automatic titles. Retire email delivery, obsolete auth routes, newsletter data, and related templates and settings.
This commit is contained in:
41
apps/users/migrations/0009_alter_user_options_and_more.py
Normal file
41
apps/users/migrations/0009_alter_user_options_and_more.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# Generated by Django 5.2.5 on 2026-09-26 07:57
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def align_email_identity_flags(apps, schema_editor):
|
||||
users = apps.get_model('users', 'User').objects
|
||||
users.filter(email__isnull=False).exclude(email='').update(is_email_verified=True)
|
||||
users.filter(email__isnull=True).update(is_email_verified=False)
|
||||
users.filter(email='').update(is_email_verified=False)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0008_alter_user_managers'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(align_email_identity_flags, migrations.RunPython.noop),
|
||||
migrations.AlterModelOptions(
|
||||
name='user',
|
||||
options={'permissions': [('send_notification', 'Can send in-app notifications')], 'verbose_name': 'User', 'verbose_name_plural': 'Users'},
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='email_verification_sent_at',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='email_verification_token',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='password_reset_token',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='password_reset_token_expires_at',
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user