Skip to content
Snippets Groups Projects
Select Git revision
  • 975c7babc0de3c171e64033a135a27fff8da179d
  • main default protected
  • renovate/django-5.x
  • koma/feature/preference-polling-form
4 results

0001_initial.py

Blame
  • Benjamin Hättasch's avatar
    Benjamin Hättasch authored
    Use official fontawesome django app for static file handling
    Switch to fork/new version of django-bootstrap (for icon field and rendering shortcuts)
    Add migration to bump icon field of dashboard buttons to new version
    Update templates to load new app and use new tags
    2455da83
    History
    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',
                },
            ),
        ]