Merge pull request #1811 from normanjaeckel/SquishMigrations
Squished all migrations.
This commit is contained in:
commit
2f8138f672
@ -1,3 +1,4 @@
|
|||||||
|
import django.db.models.deletion
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
@ -8,54 +9,53 @@ class Migration(migrations.Migration):
|
|||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
('core', '0001_initial'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
('contenttypes', '0001_initial'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Item',
|
name='Item',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('item_number', models.CharField(blank=True, max_length=255, verbose_name='Number')),
|
('item_number', models.CharField(blank=True, max_length=255)),
|
||||||
('title', models.CharField(max_length=255, verbose_name='Title', null=True)),
|
('comment', models.TextField(null=True, blank=True)),
|
||||||
('text', models.TextField(blank=True, verbose_name='Text', null=True)),
|
('closed', models.BooleanField(default=False)),
|
||||||
('comment', models.TextField(blank=True, verbose_name='Comment', null=True)),
|
('type', models.IntegerField(choices=[(1, 'Agenda item'), (2, 'Hidden item')], default=1)),
|
||||||
('closed', models.BooleanField(default=False, verbose_name='Closed')),
|
('duration', models.CharField(null=True, blank=True, max_length=5)),
|
||||||
('type', models.IntegerField(
|
('weight', models.IntegerField(default=0)),
|
||||||
verbose_name='Type',
|
('object_id', models.PositiveIntegerField(null=True, blank=True)),
|
||||||
default=1,
|
('speaker_list_closed', models.BooleanField(default=False)),
|
||||||
choices=[(1, 'Agenda item'), (2, 'Organizational item')],
|
('content_type', models.ForeignKey(
|
||||||
max_length=1)),
|
on_delete=django.db.models.deletion.SET_NULL, blank=True, null=True, to='contenttypes.ContentType')),
|
||||||
('duration', models.CharField(blank=True, max_length=5, null=True)),
|
('parent', models.ForeignKey(
|
||||||
('weight', models.IntegerField(default=0, verbose_name='Weight')),
|
related_name='children', blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='agenda.Item')),
|
||||||
('object_id', models.PositiveIntegerField(blank=True, null=True)),
|
|
||||||
('speaker_list_closed', models.BooleanField(default=False, verbose_name='List of speakers is closed')),
|
|
||||||
('content_type', models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True)),
|
|
||||||
('parent', models.ForeignKey(related_name='children', blank=True, to='agenda.Item', null=True)),
|
|
||||||
('tags', models.ManyToManyField(blank=True, to='core.Tag')),
|
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see', 'Can see agenda'),
|
('can_see', 'Can see agenda'), ('can_manage', 'Can manage agenda'),
|
||||||
('can_manage', 'Can manage agenda'),
|
('can_see_hidden_items', 'Can see hidden items and time scheduling of agenda')),
|
||||||
('can_see_orga_items', 'Can see orga items and time scheduling of agenda')),
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Speaker',
|
name='Speaker',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('begin_time', models.DateTimeField(null=True)),
|
('begin_time', models.DateTimeField(null=True)),
|
||||||
('end_time', models.DateTimeField(null=True)),
|
('end_time', models.DateTimeField(null=True)),
|
||||||
('weight', models.IntegerField(null=True)),
|
('weight', models.IntegerField(null=True)),
|
||||||
('item', models.ForeignKey(to='agenda.Item')),
|
('item', models.ForeignKey(related_name='speakers', to='agenda.Item')),
|
||||||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (('can_be_speaker', 'Can put oneself on the list of speakers'),),
|
'permissions': (('can_be_speaker', 'Can put oneself on the list of speakers'),),
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='item',
|
||||||
|
unique_together=set([('content_type', 'object_id')]),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='type',
|
|
||||||
field=models.IntegerField(verbose_name='Type', choices=[(1, 'Agenda item'), (2, 'Organizational item')], default=1),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,15 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0002_auto_20150630_0144'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='speaker',
|
|
||||||
name='item',
|
|
||||||
field=models.ForeignKey(related_name='speakers', to='agenda.Item'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,46 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0003_auto_20150904_1732'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='item',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see', 'Can see agenda'),
|
|
||||||
('can_manage', 'Can manage agenda'),
|
|
||||||
('can_see_hidden_items',
|
|
||||||
'Can see hidden items and time scheduling of agenda'))},
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='type',
|
|
||||||
field=models.IntegerField(
|
|
||||||
choices=[(1, 'Agenda item'), (2, 'Hidden item')],
|
|
||||||
verbose_name='Type',
|
|
||||||
default=1),
|
|
||||||
),
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='item',
|
|
||||||
unique_together=set([('content_type', 'object_id')]),
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='item',
|
|
||||||
name='tags',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='item',
|
|
||||||
name='text',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='item',
|
|
||||||
name='title',
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,27 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0004_auto_20151027_1423'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='item',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see', 'Can see agenda'),
|
|
||||||
('can_manage', 'Can manage agenda'),
|
|
||||||
('can_see_hidden_items', 'Can see hidden items and time scheduling of agenda')),
|
|
||||||
'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='speaker',
|
|
||||||
options={'permissions': (('can_be_speaker', 'Can put oneself on the list of speakers'),), 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,26 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.9.1 on 2016-01-09 11:45
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0005_auto_20151210_0016'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='content_type',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.ContentType'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='parent',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='agenda.Item'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,44 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('agenda', '0006_auto_20160109_1145'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='closed',
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='comment',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='item_number',
|
|
||||||
field=models.CharField(max_length=255, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='speaker_list_closed',
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='type',
|
|
||||||
field=models.IntegerField(default=1, choices=[(1, 'Agenda item'), (2, 'Hidden item')]),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='item',
|
|
||||||
name='weight',
|
|
||||||
field=models.IntegerField(default=0),
|
|
||||||
),
|
|
||||||
]
|
|
@ -7,113 +7,102 @@ import openslides.utils.models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('core', '0001_initial'),
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('core', '0001_initial'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Assignment',
|
name='Assignment',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('title', models.CharField(max_length=100, verbose_name='Title')),
|
('title', models.CharField(max_length=100)),
|
||||||
('description', models.TextField(blank=True, verbose_name='Description')),
|
('description', models.TextField(blank=True)),
|
||||||
('open_posts', models.PositiveSmallIntegerField(verbose_name='Number of members to be elected')),
|
('open_posts', models.PositiveSmallIntegerField()),
|
||||||
('poll_description_default', models.CharField(
|
('poll_description_default', models.CharField(blank=True, max_length=79)),
|
||||||
blank=True,
|
('phase', models.IntegerField(choices=[(0, 'Searching for candidates'), (1, 'Voting'), (2, 'Finished')], default=0)),
|
||||||
max_length=79,
|
|
||||||
verbose_name='Default comment on the ballot paper')),
|
|
||||||
('phase', models.IntegerField(
|
|
||||||
default=0,
|
|
||||||
choices=[(0, 'Searching for candidates'), (1, 'Voting'), (2, 'Finished')])),
|
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'Election',
|
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see', 'Can see elections'),
|
('can_see', 'Can see elections'), ('can_nominate_other', 'Can nominate another participant'),
|
||||||
('can_nominate_other', 'Can nominate another participant'),
|
('can_nominate_self', 'Can nominate oneself'), ('can_manage', 'Can manage elections')),
|
||||||
('can_nominate_self', 'Can nominate oneself'),
|
'verbose_name': 'Election',
|
||||||
('can_manage', 'Can manage elections')),
|
|
||||||
'ordering': ('title',),
|
'ordering': ('title',),
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='AssignmentOption',
|
name='AssignmentOption',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('candidate', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
('candidate', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='AssignmentPoll',
|
name='AssignmentPoll',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Valid votes')),
|
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
('votesinvalid', openslides.utils.models.MinMaxIntegerField(
|
('votesinvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
null=True,
|
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
blank=True,
|
|
||||||
verbose_name='Invalid votes')),
|
|
||||||
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Votes cast')),
|
|
||||||
('published', models.BooleanField(default=False)),
|
('published', models.BooleanField(default=False)),
|
||||||
('yesnoabstain', models.BooleanField(default=False)),
|
('yesnoabstain', models.BooleanField(default=False)),
|
||||||
('description', models.CharField(blank=True, max_length=79, verbose_name='Comment on the ballot paper')),
|
('description', models.CharField(blank=True, max_length=79)),
|
||||||
('assignment', models.ForeignKey(related_name='polls', to='assignments.Assignment')),
|
('assignment', models.ForeignKey(related_name='polls', to='assignments.Assignment')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='AssignmentRelatedUser',
|
name='AssignmentRelatedUser',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('status', models.IntegerField(default=1, choices=[(1, 'candidate'), (2, 'elected'), (3, 'blocked')])),
|
('elected', models.BooleanField(default=False)),
|
||||||
('assignment', models.ForeignKey(related_name='assignment_related_users', to='assignments.Assignment')),
|
('assignment', models.ForeignKey(related_name='assignment_related_users', to='assignments.Assignment')),
|
||||||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='AssignmentVote',
|
name='AssignmentVote',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('weight', models.IntegerField(null=True, default=1)),
|
('weight', models.IntegerField(null=True, default=1)),
|
||||||
('value', models.CharField(null=True, max_length=255)),
|
('value', models.CharField(null=True, max_length=255)),
|
||||||
('option', models.ForeignKey(to='assignments.AssignmentOption')),
|
('option', models.ForeignKey(related_name='votes', to='assignments.AssignmentOption')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='assignmentrelateduser',
|
|
||||||
unique_together=set([('assignment', 'user')]),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='assignmentoption',
|
model_name='assignmentoption',
|
||||||
name='poll',
|
name='poll',
|
||||||
field=models.ForeignKey(to='assignments.AssignmentPoll'),
|
field=models.ForeignKey(related_name='options', to='assignments.AssignmentPoll'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='assignment',
|
model_name='assignment',
|
||||||
name='related_users',
|
name='related_users',
|
||||||
field=models.ManyToManyField(through='assignments.AssignmentRelatedUser', to=settings.AUTH_USER_MODEL),
|
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, through='assignments.AssignmentRelatedUser'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='assignment',
|
model_name='assignment',
|
||||||
name='tags',
|
name='tags',
|
||||||
field=models.ManyToManyField(blank=True, to='core.Tag'),
|
field=models.ManyToManyField(blank=True, to='core.Tag'),
|
||||||
preserve_default=True,
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='assignmentrelateduser',
|
||||||
|
unique_together=set([('assignment', 'user')]),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('assignments', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentoption',
|
|
||||||
name='poll',
|
|
||||||
field=models.ForeignKey(to='assignments.AssignmentPoll', related_name='options'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentvote',
|
|
||||||
name='option',
|
|
||||||
field=models.ForeignKey(to='assignments.AssignmentOption', related_name='votes'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,42 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('assignments', '0002_auto_20151126_2153'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='assignment',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see', 'Can see elections'),
|
|
||||||
('can_nominate_other', 'Can nominate another participant'),
|
|
||||||
('can_nominate_self', 'Can nominate oneself'),
|
|
||||||
('can_manage', 'Can manage elections')),
|
|
||||||
'ordering': ('title',),
|
|
||||||
'default_permissions': (),
|
|
||||||
'verbose_name': 'Election'},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='assignmentoption',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='assignmentpoll',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='assignmentrelateduser',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='assignmentvote',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,56 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
import openslides.utils.models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('assignments', '0003_auto_20151210_0016'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignment',
|
|
||||||
name='description',
|
|
||||||
field=models.TextField(blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignment',
|
|
||||||
name='open_posts',
|
|
||||||
field=models.PositiveSmallIntegerField(),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignment',
|
|
||||||
name='poll_description_default',
|
|
||||||
field=models.CharField(max_length=79, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignment',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(max_length=100),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentpoll',
|
|
||||||
name='description',
|
|
||||||
field=models.CharField(max_length=79, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentpoll',
|
|
||||||
name='votescast',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentpoll',
|
|
||||||
name='votesinvalid',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='assignmentpoll',
|
|
||||||
name='votesvalid',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,23 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('assignments', '0004_auto_20160109_1329'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='assignmentrelateduser',
|
|
||||||
name='status',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='assignmentrelateduser',
|
|
||||||
name='elected',
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,4 +1,7 @@
|
|||||||
|
import uuid
|
||||||
|
|
||||||
import jsonfield.fields
|
import jsonfield.fields
|
||||||
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
import openslides.utils.models
|
import openslides.utils.models
|
||||||
@ -6,37 +9,61 @@ import openslides.utils.models
|
|||||||
|
|
||||||
def add_default_projector(apps, schema_editor):
|
def add_default_projector(apps, schema_editor):
|
||||||
"""
|
"""
|
||||||
Adds default projector, welcome slide and activates clock and welcome
|
Adds default projector and activates clock.
|
||||||
slide.
|
|
||||||
"""
|
"""
|
||||||
# We get the model from the versioned app registry;
|
# We get the model from the versioned app registry;
|
||||||
# if we directly import it, it will be the wrong version.
|
# if we directly import it, it will be the wrong version.
|
||||||
CustomSlide = apps.get_model('core', 'CustomSlide')
|
|
||||||
custom_slide = CustomSlide.objects.create(
|
|
||||||
title='Welcome to OpenSlides',
|
|
||||||
weight=-500)
|
|
||||||
Projector = apps.get_model('core', 'Projector')
|
Projector = apps.get_model('core', 'Projector')
|
||||||
projector_config = [
|
projector_config = {}
|
||||||
{'name': 'core/clock', 'stable': True},
|
projector_config[uuid.uuid4().hex] = {
|
||||||
{'name': 'core/customslide', 'id': custom_slide.id}]
|
'name': 'core/clock',
|
||||||
|
'stable': True}
|
||||||
Projector.objects.create(config=projector_config)
|
Projector.objects.create(config=projector_config)
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='CustomSlide',
|
name='ChatMessage',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('title', models.CharField(max_length=256, verbose_name='Title')),
|
('message', models.TextField()),
|
||||||
('text', models.TextField(blank=True, verbose_name='Text')),
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||||
('weight', models.IntegerField(verbose_name='Weight', default=0)),
|
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'permissions': (('can_use_chat', 'Can use the chat'),),
|
||||||
|
'default_permissions': (),
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ConfigStore',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
|
('key', models.CharField(db_index=True, unique=True, max_length=255)),
|
||||||
|
('value', jsonfield.fields.JSONField()),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (('can_manage_config', 'Can manage configuration'),),
|
||||||
|
'default_permissions': (),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='CustomSlide',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=256)),
|
||||||
|
('text', models.TextField(blank=True)),
|
||||||
|
('weight', models.IntegerField(default=0)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
'ordering': ('weight', 'title'),
|
'ordering': ('weight', 'title'),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
@ -44,42 +71,32 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Projector',
|
name='Projector',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('config', jsonfield.fields.JSONField()),
|
('config', jsonfield.fields.JSONField()),
|
||||||
|
('scale', models.IntegerField(default=0)),
|
||||||
|
('scroll', models.IntegerField(default=0)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see_projector', 'Can see the projector'),
|
('can_see_projector', 'Can see the projector'), ('can_manage_projector', 'Can manage the projector'),
|
||||||
('can_manage_projector', 'Can manage the projector'),
|
('can_see_dashboard', 'Can see the dashboard')),
|
||||||
('can_see_dashboard', 'Can see the dashboard'),
|
'default_permissions': (),
|
||||||
('can_use_chat', 'Can use the chat')),
|
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Tag',
|
name='Tag',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('name', models.CharField(max_length=255, verbose_name='Tag', unique=True)),
|
('name', models.CharField(unique=True, max_length=255)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'ordering': ('name',),
|
|
||||||
'permissions': (('can_manage_tags', 'Can manage tags'),),
|
'permissions': (('can_manage_tags', 'Can manage tags'),),
|
||||||
|
'default_permissions': (),
|
||||||
|
'ordering': ('name',),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
|
||||||
name='ConfigStore',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
|
||||||
('key', models.CharField(max_length=255, db_index=True, unique=True)),
|
|
||||||
('value', jsonfield.fields.JSONField()),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'permissions': (('can_manage_config', 'Can manage configuration'),),
|
|
||||||
},
|
|
||||||
bases=(models.Model,),
|
|
||||||
),
|
|
||||||
migrations.RunPython(
|
migrations.RunPython(
|
||||||
code=add_default_projector,
|
code=add_default_projector,
|
||||||
reverse_code=None,
|
reverse_code=None,
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def add_default_projector_2(apps, schema_editor):
|
|
||||||
"""
|
|
||||||
Adds default projector, activates countdown.
|
|
||||||
"""
|
|
||||||
# We get the model from the versioned app registry;
|
|
||||||
# if we directly import it, it will be the wrong version.
|
|
||||||
Projector = apps.get_model('core', 'Projector')
|
|
||||||
projector = Projector.objects.get()
|
|
||||||
config = projector.config
|
|
||||||
config.append({
|
|
||||||
'name': 'core/countdown',
|
|
||||||
'stable': True,
|
|
||||||
'status': 'stop',
|
|
||||||
'countdown_time': 60,
|
|
||||||
})
|
|
||||||
projector.config = config
|
|
||||||
projector.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
code=add_default_projector_2,
|
|
||||||
reverse_code=None,
|
|
||||||
atomic=True,
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,39 +0,0 @@
|
|||||||
import uuid
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def add_default_projector_3(apps, schema_editor):
|
|
||||||
"""
|
|
||||||
Adds UUIDs to projector config.
|
|
||||||
"""
|
|
||||||
# We get the model from the versioned app registry;
|
|
||||||
# if we directly import it, it will be the wrong version.
|
|
||||||
Projector = apps.get_model('core', 'Projector')
|
|
||||||
projector = Projector.objects.get()
|
|
||||||
|
|
||||||
def add_uuid(self):
|
|
||||||
"""
|
|
||||||
Adds an UUID to every element.
|
|
||||||
"""
|
|
||||||
for element in self.config:
|
|
||||||
if element.get('uuid') is None:
|
|
||||||
element['uuid'] = uuid.uuid4().hex
|
|
||||||
|
|
||||||
add_uuid(projector)
|
|
||||||
projector.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0002_countdown'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
code=add_default_projector_3,
|
|
||||||
reverse_code=None,
|
|
||||||
atomic=True,
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,42 +0,0 @@
|
|||||||
import uuid
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def clear_all_and_make_it_new(apps, schema_editor):
|
|
||||||
"""
|
|
||||||
Clear all elements and them write new.
|
|
||||||
"""
|
|
||||||
# We get the model from the versioned app registry;
|
|
||||||
# if we directly import it, it will be the wrong version.
|
|
||||||
Projector = apps.get_model('core', 'Projector')
|
|
||||||
projector = Projector.objects.get()
|
|
||||||
projector.config = {}
|
|
||||||
projector.config[uuid.uuid4().hex] = {
|
|
||||||
'name': 'core/clock',
|
|
||||||
'stable': True}
|
|
||||||
projector.config[uuid.uuid4().hex] = {
|
|
||||||
'name': 'core/customslide',
|
|
||||||
'id': 1} # TODO: Use ID from model here. Do not guess.
|
|
||||||
projector.config[uuid.uuid4().hex] = {
|
|
||||||
'name': 'core/countdown',
|
|
||||||
'stable': True,
|
|
||||||
'status': 'stop',
|
|
||||||
'countdown_time': 60,
|
|
||||||
'visible': False}
|
|
||||||
projector.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0003_uuid'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
code=clear_all_and_make_it_new,
|
|
||||||
reverse_code=None,
|
|
||||||
atomic=True,
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,35 +0,0 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
import openslides.utils.models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
('core', '0004_clear_all_and_make_it_new'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='ChatMessage',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
|
||||||
('message', models.TextField(verbose_name='Message')),
|
|
||||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
|
||||||
('user', models.ForeignKey(verbose_name='User', to=settings.AUTH_USER_MODEL)),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'permissions': (('can_use_chat', 'Can use the chat'),),
|
|
||||||
},
|
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='projector',
|
|
||||||
options={'permissions': (
|
|
||||||
('can_see_projector', 'Can see the projector'),
|
|
||||||
('can_manage_projector', 'Can manage the projector'),
|
|
||||||
('can_see_dashboard', 'Can see the dashboard'))},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,21 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0005_add_chat_message_model'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='projector',
|
|
||||||
name='scale',
|
|
||||||
field=models.IntegerField(default=0),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='projector',
|
|
||||||
name='scroll',
|
|
||||||
field=models.IntegerField(default=0),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,36 +0,0 @@
|
|||||||
import uuid
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def clear_all_and_make_it_new_2(apps, schema_editor):
|
|
||||||
"""
|
|
||||||
Clear all projector elements and them write new.
|
|
||||||
"""
|
|
||||||
# We get the model from the versioned app registry;
|
|
||||||
# if we directly import it, it will be the wrong version.
|
|
||||||
Projector = apps.get_model('core', 'Projector')
|
|
||||||
projector = Projector.objects.get()
|
|
||||||
projector.config = {}
|
|
||||||
projector.config[uuid.uuid4().hex] = {
|
|
||||||
'name': 'core/clock',
|
|
||||||
'stable': True}
|
|
||||||
projector.config[uuid.uuid4().hex] = {
|
|
||||||
'name': 'core/customslide',
|
|
||||||
'id': 1} # TODO: Use ID from model here. Do not guess.
|
|
||||||
projector.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0006_auto_20150914_2232'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
code=clear_all_and_make_it_new_2,
|
|
||||||
reverse_code=None,
|
|
||||||
atomic=True,
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,39 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0007_clear_default_countdown'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='chatmessage',
|
|
||||||
options={'permissions': (('can_use_chat', 'Can use the chat'),), 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='configstore',
|
|
||||||
options={'permissions': (('can_manage_config', 'Can manage configuration'),), 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='customslide',
|
|
||||||
options={'ordering': ('weight', 'title'), 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='projector',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see_projector', 'Can see the projector'),
|
|
||||||
('can_manage_projector', 'Can manage the projector'),
|
|
||||||
('can_see_dashboard', 'Can see the dashboard')),
|
|
||||||
'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='tag',
|
|
||||||
options={'permissions': (('can_manage_tags', 'Can manage tags'),), 'ordering': ('name',), 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,45 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('core', '0008_auto_20151210_0016'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='chatmessage',
|
|
||||||
name='message',
|
|
||||||
field=models.TextField(),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='chatmessage',
|
|
||||||
name='user',
|
|
||||||
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='customslide',
|
|
||||||
name='text',
|
|
||||||
field=models.TextField(blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='customslide',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(max_length=256),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='customslide',
|
|
||||||
name='weight',
|
|
||||||
field=models.IntegerField(default=0),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='tag',
|
|
||||||
name='name',
|
|
||||||
field=models.CharField(max_length=255, unique=True),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,3 +1,4 @@
|
|||||||
|
import django.db.models.deletion
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
@ -14,23 +15,16 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Mediafile',
|
name='Mediafile',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('mediafile', models.FileField(upload_to='file', verbose_name='File')),
|
('mediafile', models.FileField(upload_to='file')),
|
||||||
('title', models.CharField(unique=True, verbose_name='Title', max_length=255)),
|
('title', models.CharField(blank=True, unique=True, max_length=255)),
|
||||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||||
('filetype', models.CharField(editable=False, max_length=255)),
|
('uploader', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, null=True, to=settings.AUTH_USER_MODEL)),
|
||||||
('is_presentable', models.BooleanField(
|
|
||||||
default=False,
|
|
||||||
help_text='If checked, this file can be presented on the projector. '
|
|
||||||
'Currently, this is only possible for PDFs.',
|
|
||||||
verbose_name='Is Presentable')),
|
|
||||||
('uploader', models.ForeignKey(to=settings.AUTH_USER_MODEL, blank=True, verbose_name='Uploaded by', null=True)),
|
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see', 'Can see the list of files'),
|
('can_see', 'Can see the list of files'), ('can_upload', 'Can upload files'), ('can_manage', 'Can manage files')),
|
||||||
('can_upload', 'Can upload files'),
|
'default_permissions': (),
|
||||||
('can_manage', 'Can manage files')),
|
|
||||||
'ordering': ['title'],
|
'ordering': ['title'],
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('mediafiles', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='is_presentable',
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(max_length=255, null=True, unique=True, blank=True, verbose_name='Title'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,20 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
('mediafiles', '0002_auto_20150906_1246'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='filetype',
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(unique=True, verbose_name='Title', max_length=255, default='', blank=True),
|
|
||||||
preserve_default=False,
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,24 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('mediafiles', '0003_auto_20150917_1226'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='mediafile',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see', 'Can see the list of files'),
|
|
||||||
('can_upload', 'Can upload files'),
|
|
||||||
('can_manage', 'Can manage files')),
|
|
||||||
'ordering': ['title'],
|
|
||||||
'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,27 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.9.1 on 2016-01-09 11:45
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('mediafiles', '0004_auto_20151210_0016'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='uploader',
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_NULL,
|
|
||||||
to=settings.AUTH_USER_MODEL,
|
|
||||||
verbose_name='Uploaded by'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,31 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('mediafiles', '0005_auto_20160109_1145'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='mediafile',
|
|
||||||
field=models.FileField(upload_to='file'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(max_length=255, blank=True, unique=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='mediafile',
|
|
||||||
name='uploader',
|
|
||||||
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
@ -9,20 +9,21 @@ import openslides.utils.models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('mediafiles', '__first__'),
|
|
||||||
('core', '0001_initial'),
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('mediafiles', '0001_initial'),
|
||||||
|
('core', '0001_initial'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Category',
|
name='Category',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('name', models.CharField(max_length=255, verbose_name='Category name')),
|
('name', models.CharField(max_length=255)),
|
||||||
('prefix', models.CharField(blank=True, max_length=32, verbose_name='Prefix')),
|
('prefix', models.CharField(blank=True, max_length=32)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
'ordering': ['prefix'],
|
'ordering': ['prefix'],
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
@ -30,31 +31,31 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Motion',
|
name='Motion',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('identifier', models.CharField(null=True, blank=True, max_length=255, unique=True)),
|
('identifier', models.CharField(null=True, unique=True, blank=True, max_length=255)),
|
||||||
('identifier_number', models.IntegerField(null=True)),
|
('identifier_number', models.IntegerField(null=True)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see', 'Can see motions'),
|
('can_see', 'Can see motions'), ('can_create', 'Can create motions'),
|
||||||
('can_create', 'Can create motions'),
|
('can_support', 'Can support motions'), ('can_manage', 'Can manage motions')),
|
||||||
('can_support', 'Can support motions'),
|
|
||||||
('can_manage', 'Can manage motions')),
|
|
||||||
'ordering': ('identifier',),
|
|
||||||
'verbose_name': 'Motion',
|
'verbose_name': 'Motion',
|
||||||
|
'ordering': ('identifier',),
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='MotionLog',
|
name='MotionLog',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('message_list', jsonfield.fields.JSONField()),
|
('message_list', jsonfield.fields.JSONField()),
|
||||||
('time', models.DateTimeField(auto_now=True)),
|
('time', models.DateTimeField(auto_now=True)),
|
||||||
('motion', models.ForeignKey(related_name='log_messages', to='motions.Motion')),
|
('motion', models.ForeignKey(related_name='log_messages', to='motions.Motion')),
|
||||||
('person', models.ForeignKey(null=True, to=settings.AUTH_USER_MODEL)),
|
('person', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, null=True, to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
'ordering': ['-time'],
|
'ordering': ['-time'],
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
@ -62,65 +63,63 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='MotionOption',
|
name='MotionOption',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='MotionPoll',
|
name='MotionPoll',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Valid votes')),
|
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
('votesinvalid', openslides.utils.models.MinMaxIntegerField(
|
('votesinvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
null=True,
|
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True)),
|
||||||
blank=True,
|
|
||||||
verbose_name='Invalid votes')),
|
|
||||||
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Votes cast')),
|
|
||||||
('poll_number', models.PositiveIntegerField(default=1)),
|
|
||||||
('motion', models.ForeignKey(related_name='polls', to='motions.Motion')),
|
('motion', models.ForeignKey(related_name='polls', to='motions.Motion')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='MotionVersion',
|
name='MotionVersion',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('version_number', models.PositiveIntegerField(default=1)),
|
('version_number', models.PositiveIntegerField(default=1)),
|
||||||
('title', models.CharField(max_length=255, verbose_name='Title')),
|
('title', models.CharField(max_length=255)),
|
||||||
('text', models.TextField(verbose_name='Text')),
|
('text', models.TextField()),
|
||||||
('reason', models.TextField(null=True, blank=True, verbose_name='Reason')),
|
('reason', models.TextField(null=True, blank=True)),
|
||||||
('creation_time', models.DateTimeField(auto_now=True)),
|
('creation_time', models.DateTimeField(auto_now=True)),
|
||||||
('motion', models.ForeignKey(related_name='versions', to='motions.Motion')),
|
('motion', models.ForeignKey(related_name='versions', to='motions.Motion')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='MotionVote',
|
name='MotionVote',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('weight', models.IntegerField(null=True, default=1)),
|
('weight', models.IntegerField(null=True, default=1)),
|
||||||
('value', models.CharField(null=True, max_length=255)),
|
('value', models.CharField(null=True, max_length=255)),
|
||||||
('option', models.ForeignKey(to='motions.MotionOption')),
|
('option', models.ForeignKey(to='motions.MotionOption')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='State',
|
name='State',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('name', models.CharField(max_length=255)),
|
('name', models.CharField(max_length=255)),
|
||||||
('action_word', models.CharField(max_length=255)),
|
('action_word', models.CharField(max_length=255)),
|
||||||
('icon', models.CharField(max_length=255)),
|
('css_class', models.CharField(default='primary', max_length=255)),
|
||||||
('required_permission_to_see', models.CharField(blank=True, max_length=255)),
|
('required_permission_to_see', models.CharField(blank=True, max_length=255)),
|
||||||
('allow_support', models.BooleanField(default=False)),
|
('allow_support', models.BooleanField(default=False)),
|
||||||
('allow_create_poll', models.BooleanField(default=False)),
|
('allow_create_poll', models.BooleanField(default=False)),
|
||||||
@ -131,90 +130,77 @@ class Migration(migrations.Migration):
|
|||||||
('next_states', models.ManyToManyField(to='motions.State')),
|
('next_states', models.ManyToManyField(to='motions.State')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Workflow',
|
name='Workflow',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
|
||||||
('name', models.CharField(max_length=255)),
|
('name', models.CharField(max_length=255)),
|
||||||
('first_state', models.OneToOneField(to='motions.State', null=True, related_name='+')),
|
('first_state', models.OneToOneField(
|
||||||
|
related_name='+', null=True, on_delete=django.db.models.deletion.SET_NULL, to='motions.State')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='state',
|
model_name='state',
|
||||||
name='workflow',
|
name='workflow',
|
||||||
field=models.ForeignKey(to='motions.Workflow'),
|
field=models.ForeignKey(related_name='states', to='motions.Workflow'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='motionversion',
|
|
||||||
unique_together=set([('motion', 'version_number')]),
|
|
||||||
),
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='motionpoll',
|
|
||||||
unique_together=set([('motion', 'poll_number')]),
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motionoption',
|
model_name='motionoption',
|
||||||
name='poll',
|
name='poll',
|
||||||
field=models.ForeignKey(to='motions.MotionPoll'),
|
field=models.ForeignKey(to='motions.MotionPoll'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='active_version',
|
name='active_version',
|
||||||
field=models.ForeignKey(
|
field=models.ForeignKey(
|
||||||
to='motions.MotionVersion',
|
related_name='active_version', null=True, on_delete=django.db.models.deletion.SET_NULL, to='motions.MotionVersion'),
|
||||||
on_delete=django.db.models.deletion.SET_NULL,
|
|
||||||
null=True,
|
|
||||||
related_name='active_version'),
|
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='attachments',
|
name='attachments',
|
||||||
field=models.ManyToManyField(to='mediafiles.Mediafile'),
|
field=models.ManyToManyField(blank=True, to='mediafiles.Mediafile'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='category',
|
name='category',
|
||||||
field=models.ForeignKey(to='motions.Category', null=True, blank=True),
|
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, null=True, to='motions.Category'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='parent',
|
name='parent',
|
||||||
field=models.ForeignKey(to='motions.Motion', null=True, blank=True, related_name='amendments'),
|
field=models.ForeignKey(
|
||||||
preserve_default=True,
|
related_name='amendments', blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='motions.Motion'),
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='state',
|
name='state',
|
||||||
field=models.ForeignKey(null=True, to='motions.State'),
|
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, null=True, to='motions.State'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='submitters',
|
name='submitters',
|
||||||
field=models.ManyToManyField(related_name='motion_submitters', to=settings.AUTH_USER_MODEL),
|
field=models.ManyToManyField(related_name='motion_submitters', blank=True, to=settings.AUTH_USER_MODEL),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='supporters',
|
name='supporters',
|
||||||
field=models.ManyToManyField(related_name='motion_supporters', to=settings.AUTH_USER_MODEL),
|
field=models.ManyToManyField(related_name='motion_supporters', blank=True, to=settings.AUTH_USER_MODEL),
|
||||||
preserve_default=True,
|
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='motion',
|
model_name='motion',
|
||||||
name='tags',
|
name='tags',
|
||||||
field=models.ManyToManyField(to='core.Tag'),
|
field=models.ManyToManyField(blank=True, to='core.Tag'),
|
||||||
preserve_default=True,
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='motionversion',
|
||||||
|
unique_together=set([('motion', 'version_number')]),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='attachments',
|
|
||||||
field=models.ManyToManyField(blank=True, to='mediafiles.Mediafile'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='submitters',
|
|
||||||
field=models.ManyToManyField(blank=True, related_name='motion_submitters', to=settings.AUTH_USER_MODEL),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='supporters',
|
|
||||||
field=models.ManyToManyField(blank=True, related_name='motion_supporters', to=settings.AUTH_USER_MODEL),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='tags',
|
|
||||||
field=models.ManyToManyField(blank=True, to='core.Tag'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,19 +0,0 @@
|
|||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0002_auto_20150904_1448'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='motionpoll',
|
|
||||||
unique_together=set([]),
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='motionpoll',
|
|
||||||
name='poll_number',
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,29 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0003_auto_20150904_2029'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name='state',
|
|
||||||
old_name='icon',
|
|
||||||
new_name='css_class',
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='state',
|
|
||||||
name='css_class',
|
|
||||||
field=models.CharField(max_length=255, default='primary'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='state',
|
|
||||||
name='workflow',
|
|
||||||
field=models.ForeignKey(to='motions.Workflow', related_name='states'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,58 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0004_auto_20151105_2312'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='category',
|
|
||||||
options={'ordering': ['prefix'], 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motion',
|
|
||||||
options={
|
|
||||||
'ordering': ('identifier',),
|
|
||||||
'verbose_name': 'Motion',
|
|
||||||
'default_permissions': (),
|
|
||||||
'permissions': (
|
|
||||||
('can_see', 'Can see motions'),
|
|
||||||
('can_create', 'Can create motions'),
|
|
||||||
('can_support', 'Can support motions'),
|
|
||||||
('can_manage', 'Can manage motions'))},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motionlog',
|
|
||||||
options={'ordering': ['-time'], 'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motionoption',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motionpoll',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motionversion',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='motionvote',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='state',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='workflow',
|
|
||||||
options={'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,47 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Generated by Django 1.9.1 on 2016-01-09 11:45
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0005_auto_20151210_0019'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='category',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='motions.Category'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='parent',
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_NULL,
|
|
||||||
related_name='amendments',
|
|
||||||
to='motions.Motion'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motion',
|
|
||||||
name='state',
|
|
||||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='motions.State'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionlog',
|
|
||||||
name='person',
|
|
||||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='workflow',
|
|
||||||
name='first_state',
|
|
||||||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='motions.State'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,56 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
import openslides.utils.models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('motions', '0006_auto_20160109_1145'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='category',
|
|
||||||
name='name',
|
|
||||||
field=models.CharField(max_length=255),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='category',
|
|
||||||
name='prefix',
|
|
||||||
field=models.CharField(max_length=32, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionpoll',
|
|
||||||
name='votescast',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionpoll',
|
|
||||||
name='votesinvalid',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionpoll',
|
|
||||||
name='votesvalid',
|
|
||||||
field=openslides.utils.models.MinMaxIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionversion',
|
|
||||||
name='reason',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionversion',
|
|
||||||
name='text',
|
|
||||||
field=models.TextField(),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='motionversion',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(max_length=255),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,4 +1,3 @@
|
|||||||
import django.utils.timezone
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
import openslides.utils.models
|
import openslides.utils.models
|
||||||
@ -7,69 +6,43 @@ import openslides.utils.models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('auth', '0001_initial'),
|
('auth', '0006_require_contenttypes_0002'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='User',
|
name='User',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
|
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
('password', models.CharField(verbose_name='password', max_length=128)),
|
||||||
('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')),
|
('last_login', models.DateTimeField(verbose_name='last login', null=True, blank=True)),
|
||||||
('is_superuser', models.BooleanField(
|
('is_superuser', models.BooleanField(
|
||||||
default=False,
|
help_text='Designates that this user has all permissions without explicitly assigning them.',
|
||||||
verbose_name='superuser status',
|
verbose_name='superuser status', default=False)),
|
||||||
help_text='Designates that this user has all permissions without explicitly assigning them.')),
|
('username', models.CharField(max_length=255, blank=True, unique=True)),
|
||||||
('username', models.CharField(max_length=255, blank=True, verbose_name='Username', unique=True)),
|
('first_name', models.CharField(max_length=255, blank=True)),
|
||||||
('first_name', models.CharField(max_length=255, blank=True, verbose_name='First name')),
|
('last_name', models.CharField(max_length=255, blank=True)),
|
||||||
('last_name', models.CharField(max_length=255, blank=True, verbose_name='Last name')),
|
('structure_level', models.CharField(blank=True, max_length=255, default='')),
|
||||||
('structure_level', models.CharField(
|
('title', models.CharField(blank=True, max_length=50, default='')),
|
||||||
default='',
|
('about_me', models.TextField(blank=True, default='')),
|
||||||
max_length=255,
|
('comment', models.TextField(blank=True, default='')),
|
||||||
blank=True,
|
('default_password', models.CharField(blank=True, max_length=100, default='')),
|
||||||
verbose_name='Structure level',
|
('is_active', models.BooleanField(default=True)),
|
||||||
help_text='Will be shown after the name.')),
|
('is_present', models.BooleanField(default=False)),
|
||||||
('title', models.CharField(
|
|
||||||
default='',
|
|
||||||
max_length=50,
|
|
||||||
blank=True,
|
|
||||||
verbose_name='Title',
|
|
||||||
help_text='Will be shown before the name.')),
|
|
||||||
('about_me', models.TextField(default='', blank=True, verbose_name='About me', help_text='Your profile text')),
|
|
||||||
('comment', models.TextField(default='', blank=True, verbose_name='Comment', help_text='Only for notes.')),
|
|
||||||
('default_password', models.CharField(default='', max_length=100, blank=True, verbose_name='Default password')),
|
|
||||||
('is_active', models.BooleanField(
|
|
||||||
default=True,
|
|
||||||
verbose_name='active',
|
|
||||||
help_text='Designates whether this user should be treated as '
|
|
||||||
'active. Unselect this instead of deleting accounts.')),
|
|
||||||
('is_present', models.BooleanField(
|
|
||||||
default=False,
|
|
||||||
verbose_name='present',
|
|
||||||
help_text='Designates whether this user is in the room or not.')),
|
|
||||||
('groups', models.ManyToManyField(
|
('groups', models.ManyToManyField(
|
||||||
blank=True,
|
|
||||||
verbose_name='groups',
|
|
||||||
related_query_name='user',
|
|
||||||
related_name='user_set',
|
related_name='user_set',
|
||||||
to='auth.Group',
|
help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
|
||||||
help_text='The groups this user belongs to. A user will get '
|
verbose_name='groups', blank=True, to='auth.Group', related_query_name='user')),
|
||||||
'all permissions granted to each of his/her group.')),
|
|
||||||
('user_permissions', models.ManyToManyField(
|
('user_permissions', models.ManyToManyField(
|
||||||
blank=True,
|
related_name='user_set', help_text='Specific permissions for this user.', verbose_name='user permissions',
|
||||||
verbose_name='user permissions',
|
blank=True, to='auth.Permission', related_query_name='user')),
|
||||||
related_query_name='user',
|
|
||||||
related_name='user_set',
|
|
||||||
to='auth.Permission',
|
|
||||||
help_text='Specific permissions for this user.')),
|
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'permissions': (
|
'permissions': (
|
||||||
('can_see_name', 'Can see names of users'),
|
('can_see_name', 'Can see names of users'), ('can_see_extra_data', 'Can see extra data of users'),
|
||||||
('can_see_extra_data', 'Can see extra data of users'),
|
|
||||||
('can_manage', 'Can manage users')),
|
('can_manage', 'Can manage users')),
|
||||||
'ordering': ('last_name',),
|
'ordering': ('last_name', 'first_name', 'username'),
|
||||||
|
'default_permissions': (),
|
||||||
},
|
},
|
||||||
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
),
|
),
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('users', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='groups',
|
|
||||||
field=models.ManyToManyField(
|
|
||||||
verbose_name='groups',
|
|
||||||
related_query_name='user',
|
|
||||||
to='auth.Group',
|
|
||||||
related_name='user_set',
|
|
||||||
help_text='The groups this user belongs to. A user will get all '
|
|
||||||
'permissions granted to each of their groups.',
|
|
||||||
blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='last_login',
|
|
||||||
field=models.DateTimeField(verbose_name='last login', blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,38 +0,0 @@
|
|||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('users', '0002_auto_20150630_0143'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='user',
|
|
||||||
options={
|
|
||||||
'ordering': ('last_name', 'first_name', 'username'),
|
|
||||||
'permissions': (
|
|
||||||
('can_see_name', 'Can see names of users'),
|
|
||||||
('can_see_extra_data', 'Can see extra data of users'),
|
|
||||||
('can_manage', 'Can manage users'))},
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='about_me',
|
|
||||||
field=models.TextField(blank=True, help_text='Profile text.', default='', verbose_name='About me'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='is_active',
|
|
||||||
field=models.BooleanField(
|
|
||||||
help_text='Designates whether this user should be treated as active. Unselect this instead of deleting the account.',
|
|
||||||
default=True,
|
|
||||||
verbose_name='Active'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='is_present',
|
|
||||||
field=models.BooleanField(help_text='Designates whether this user is in the room or not.', default=False, verbose_name='Present'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,24 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('users', '0003_auto_20151021_2320'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name='user',
|
|
||||||
options={
|
|
||||||
'permissions': (
|
|
||||||
('can_see_name', 'Can see names of users'),
|
|
||||||
('can_see_extra_data', 'Can see extra data of users'),
|
|
||||||
('can_manage', 'Can manage users')),
|
|
||||||
'ordering': ('last_name', 'first_name', 'username'),
|
|
||||||
'default_permissions': ()},
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,64 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('users', '0004_auto_20151210_0016'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='about_me',
|
|
||||||
field=models.TextField(default='', blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='comment',
|
|
||||||
field=models.TextField(default='', blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='default_password',
|
|
||||||
field=models.CharField(default='', max_length=100, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='first_name',
|
|
||||||
field=models.CharField(max_length=255, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='is_active',
|
|
||||||
field=models.BooleanField(default=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='is_present',
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='last_name',
|
|
||||||
field=models.CharField(max_length=255, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='structure_level',
|
|
||||||
field=models.CharField(default='', max_length=255, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='title',
|
|
||||||
field=models.CharField(default='', max_length=50, blank=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='user',
|
|
||||||
name='username',
|
|
||||||
field=models.CharField(max_length=255, blank=True, unique=True),
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user