OpenSlides/server/openslides/core/migrations/0032_add_monospace_font.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

28 lines
729 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from openslides.core.config import config
def update_available_fonts(apps, schema_editor):
ConfigStore = apps.get_model("core", "ConfigStore")
try:
fonts = ConfigStore.objects.get(key="fonts_available")
except ConfigStore.DoesNotExist:
return # The key is not in the database, nothing to change here
default_fonts = config.config_variables["fonts_available"].default_value
fonts.value = default_fonts
fonts.save()
class Migration(migrations.Migration):
dependencies = [("core", "0031_projector_default_height")]
operations = [migrations.RunPython(update_available_fonts)]