OpenSlides/server/openslides/core/migrations/0004_auto_20170215_1624.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

32 lines
1.0 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-15 15:24
from __future__ import unicode_literals
from django.db import migrations
def rename_projector_message_slides(apps, schema_editor):
"""
Renames projector message slides in projector model.
Old name 'core/projectormessage', new name 'core/projector-message'.
"""
# 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")
for projector in Projector.objects.all():
new_config = {}
for key, value in projector.config.items():
new_config[key] = value
if value["name"] == "core/projectormessage":
new_config[key]["name"] = "core/projector-message"
projector.config = new_config
projector.save(skip_autoupdate=True)
class Migration(migrations.Migration):
dependencies = [("core", "0003_auto_20161217_1158")]
operations = [migrations.RunPython(rename_projector_message_slides)]