Select Git revision
0050_message_event_reference.py
-
Benjamin Hättasch authored
Add a new mandatory event reference to the model Add a migration that makes sure all existing messages are updated accordingly Adapt the frontend view that sends the message to fill the event field
Benjamin Hättasch authoredAdd a new mandatory event reference to the model Add a migration that makes sure all existing messages are updated accordingly Adapt the frontend view that sends the message to fill the event field
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
0001_initial.py 1.49 KiB
# Generated by Django 2.2.6 on 2020-01-12 23:30
from django.db import migrations, models
import django.db.models.deletion
import fontawesome_6.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('AKModel', '0026_akslot_updated'),
]
operations = [
migrations.CreateModel(
name='DashboardButton',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(help_text='Text that will be shown on the button', max_length=50, verbose_name='Text')),
('url', models.URLField(help_text='URL this button links to', verbose_name='Link URL')),
('icon', fontawesome_6.fields.IconField(blank=True, default='external-link-alt', help_text='Symbol represeting this button.', max_length=60, verbose_name='Icon')),
('color', models.PositiveSmallIntegerField(choices=[(0, 'primary'), (1, 'success'), (2, 'info'), (3, 'warning'), (4, 'danger')], default=0, help_text='Style (Color) of this button (bootstrap class)', verbose_name='Button Style')),
('event', models.ForeignKey(help_text='Event this button belongs to', on_delete=django.db.models.deletion.CASCADE, to='AKModel.Event', verbose_name='Event')),
],
options={
'verbose_name': 'Dashboard Button',
'verbose_name_plural': 'Dashboard Buttons',
},
),
]