55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.9 on 2016-08-29 09:37
|
|
from __future__ import unicode_literals
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
import openslides.utils.models
|
|
|
|
|
|
def name_default_projector(apps, schema_editor):
|
|
"""
|
|
Set the name of the default projector to 'Defaultprojector'
|
|
"""
|
|
Projector = apps.get_model('core', 'Projector')
|
|
Projector.objects.filter(pk=1).update(name='Default projector')
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('core', '0005_auto_20160918_2104'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ProjectionDefault',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=256)),
|
|
('display_name', models.CharField(max_length=256)),
|
|
],
|
|
options={
|
|
'default_permissions': (),
|
|
},
|
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
|
),
|
|
migrations.AddField(
|
|
model_name='projector',
|
|
name='name',
|
|
field=models.CharField(blank=True, max_length=255, unique=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name='projector',
|
|
name='blank',
|
|
field=models.BooleanField(blank=False, default=False),
|
|
),
|
|
migrations.AddField(
|
|
model_name='projectiondefault',
|
|
name='projector',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projectiondefaults', to='core.Projector'),
|
|
),
|
|
migrations.RunPython(name_default_projector),
|
|
]
|