Skip to content
Snippets Groups Projects

Custom calendar colors for appointment location and appointment status

Merged Piotr Gawron requested to merge 89-calendar-colors into master
1 file
+ 24
0
Compare changes
  • Side-by-side
  • Inline
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-04-04 09:43
from __future__ import unicode_literals
from django.db import migrations
def configuration_item_color_fields(apps, schema_editor):
# We can't import the Location model directly as it may be a newer
# version than this migration expects. We use the historical version.
Location = apps.get_model("web", "Location")
locations = Location.objects.filter(name="Flying Team")
for location in locations:
location.color = "#FF8000"
class Migration(migrations.Migration):
dependencies = [
('web', '0027_auto_20170404_1505'),
]
operations = [
migrations.RunPython(configuration_item_color_fields),
]
Loading