-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...pps/announcements/migrations/0034_historicalannouncement_historicalwarningannouncement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Generated by Django 3.2.25 on 2024-10-05 05:34 | ||
|
||
import datetime | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
from django.utils.timezone import utc | ||
import simple_history.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('eighth', '0070_eighthactivity_club_sponsors'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('announcements', '0033_announcement_activity'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='HistoricalWarningAnnouncement', | ||
fields=[ | ||
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), | ||
('title', models.CharField(max_length=127)), | ||
('content', models.TextField(help_text='Content of the warning. You can use HTML here.')), | ||
('type', models.CharField(choices=[('dashboard', 'Dashboard Warning (displays on dashboard)'), ('login', 'Login Warning (displays on login page)'), ('dashboard_login', 'Dashboard and Login Warning (displays on dashboard and login pages)'), ('global', 'Global Warning (displays on all pages)')], default='dashboard', max_length=127)), | ||
('active', models.BooleanField(default=True, help_text='Whether or not to show the warning.')), | ||
('added', models.DateTimeField(blank=True, editable=False)), | ||
('history_id', models.AutoField(primary_key=True, serialize=False)), | ||
('history_date', models.DateTimeField(db_index=True)), | ||
('history_change_reason', models.CharField(max_length=100, null=True)), | ||
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), | ||
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name': 'historical warning announcement', | ||
'verbose_name_plural': 'historical warning announcements', | ||
'ordering': ('-history_date', '-history_id'), | ||
'get_latest_by': ('history_date', 'history_id'), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
migrations.CreateModel( | ||
name='HistoricalAnnouncement', | ||
fields=[ | ||
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), | ||
('title', models.CharField(max_length=127)), | ||
('content', models.TextField()), | ||
('author', models.CharField(blank=True, max_length=63)), | ||
('added', models.DateTimeField(blank=True, editable=False)), | ||
('updated', models.DateTimeField(blank=True, editable=False)), | ||
('expiration_date', models.DateTimeField(default=datetime.datetime(3000, 1, 1, 5, 0, tzinfo=utc))), | ||
('notify_post', models.BooleanField(default=True)), | ||
('notify_email_all', models.BooleanField(default=False)), | ||
('pinned', models.BooleanField(default=False)), | ||
('history_id', models.AutoField(primary_key=True, serialize=False)), | ||
('history_date', models.DateTimeField(db_index=True)), | ||
('history_change_reason', models.CharField(max_length=100, null=True)), | ||
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), | ||
('activity', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='eighth.eighthactivity')), | ||
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), | ||
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name': 'historical announcement', | ||
'verbose_name_plural': 'historical announcements', | ||
'ordering': ('-history_date', '-history_id'), | ||
'get_latest_by': ('history_date', 'history_id'), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters