0005_slide.py 1.93 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Generated by Django 2.0.8 on 2018-10-18 08:55

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('announcements', '0004_frontpagearticle'),
    ]

    operations = [
        migrations.CreateModel(
            name='Slide',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='The title of the slide; just for the admin.', max_length=100, verbose_name='Title')),
                ('since', models.DateTimeField(default=django.utils.timezone.now, help_text='Hide this slide before this time.', verbose_name='Display since')),
                ('until', models.DateTimeField(blank=True, help_text='Hide this slide after this time.', null=True, verbose_name='Display until')),
                ('order', models.PositiveIntegerField(default=0, help_text='Approximately where this slide should appear in the order', verbose_name='Order')),
                ('members_only', models.BooleanField(default=False, verbose_name='Display only for authenticated members')),
                ('url', models.URLField(blank=True, help_text='Place the user is taken to when clicking the slide', null=True, verbose_name='Link')),
                ('url_blank', models.BooleanField(default=False, help_text='Clicking the slide will open a new tab', verbose_name='Link outside thalia.nu')),
                ('content_en', models.ImageField(help_text='The content of the slide; what image to display.', upload_to='public/announcements/slides/', verbose_name='Content (EN)')),
                ('content_nl', models.ImageField(help_text='The content of the slide; what image to display.', upload_to='public/announcements/slides/', verbose_name='Content (NL)')),
            ],
            options={
                'ordering': ('-since',),
            },
        ),
    ]