2017-02-22 18:19:49 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
|
|
|
2017-07-26 20:24:49 +02:00
|
|
|
def create_groups(apps, schema_editor):
|
|
|
|
"""
|
|
|
|
Creates the groups for BDS members and staff
|
|
|
|
"""
|
|
|
|
Group = apps.get_model("auth", "Group")
|
|
|
|
Group.objects.get_or_create(name="bds_members")
|
|
|
|
Group.objects.get_or_create(name="bds_buro")
|
|
|
|
|
|
|
|
|
2017-02-22 18:19:49 +01:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('bds', '0001_initial'),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.AlterModelOptions(
|
|
|
|
name='bdsprofile',
|
|
|
|
options={
|
|
|
|
'permissions': [
|
|
|
|
('member', 'Is a BDS member'),
|
|
|
|
('buro', 'Is part of the BDS staff')
|
|
|
|
],
|
|
|
|
'verbose_name': 'Profil BDS',
|
|
|
|
'verbose_name_plural': 'Profils BDS'
|
|
|
|
},
|
|
|
|
),
|
2017-07-26 20:24:49 +02:00
|
|
|
migrations.RunPython(create_groups, migrations.RunPython.noop),
|
2017-02-22 18:19:49 +01:00
|
|
|
]
|