forked from DGNum/gestioCOF
35 lines
926 B
Python
35 lines
926 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
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")
|
|
|
|
|
|
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),
|
|
]
|