6 changed files with 139 additions and 22 deletions
-
55apps/account/migrations/0009_schedulednotification_body_en_and_more.py
-
12apps/account/models/notification.py
-
17apps/account/serializers/notification.py
-
27apps/account/tasks.py
-
1apps/account/urls.py
-
29apps/account/views/notification.py
@ -0,0 +1,55 @@ |
|||
# Generated by Django 4.2.30 on 2026-07-11 16:34 |
|||
|
|||
from django.conf import settings |
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('account', '0008_remove_notificationtemplate_body_fa_and_more'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='body_en', |
|||
field=models.TextField(blank=True, max_length=1024, null=True, verbose_name='body (EN)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='body_ru', |
|||
field=models.TextField(blank=True, max_length=1024, null=True, verbose_name='body (RU)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='send_to_all', |
|||
field=models.BooleanField(default=False, verbose_name='send to all active users'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='title_en', |
|||
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='title (EN)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='title_ru', |
|||
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='title (RU)'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='schedulednotification', |
|||
name='user', |
|||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='scheduled_notifications', to=settings.AUTH_USER_MODEL, verbose_name='user'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='schedulednotification', |
|||
name='target_group', |
|||
field=models.CharField(blank=True, choices=[('all_students', 'All Students'), ('inactive_students', 'Students Inactive for > 7 Days'), ('all_professors', 'All Professors')], max_length=50, null=True, verbose_name='target group'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='schedulednotification', |
|||
name='template', |
|||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='account.notificationtemplate', verbose_name='template'), |
|||
), |
|||
] |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue