old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11 on 2017-07-03 09:54
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  def create_basic_calendars(app, schema):
      Calendar = app.get_model('events', 'Calendar')
  
      for label in ['evenements_locaux', 'melenchon']:
          Calendar.objects.create(label=label)
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('events', '0003_auto_20170616_1314'),
      ]
  
      operations = [
          migrations.RunPython(create_basic_calendars)
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11 on 2017-07-03 09:54
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  def create_basic_calendars(app, schema):
      Calendar = app.get_model('events', 'Calendar')
  
      for label in ['evenements_locaux', 'melenchon']:
          Calendar.objects.get_or_create(label=label)
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('events', '0003_auto_20170616_1314'),
      ]
  
      operations = [
          migrations.RunPython(create_basic_calendars)
      ]
  
subject: Correct basic calendars migration