2017-02-22 18:19:49 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
|
|
|
|
|
|
def create_groups(apps, schema_editor):
|
2017-02-23 17:53:48 +01:00
|
|
|
"""
|
|
|
|
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'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.RunPython(create_groups, migrations.RunPython.noop),
|
|
|
|
]
|