forked from DGNum/gestioCOF
ded824bddd
KFetGroup model - Provides a distinction from non-kfet Groups. - Convert code appropriately. - Initially filled from Groups containing K-Fêt (this was the previous distinction) in the kfetauth.0002 migration. Permission proxy model (kfetauth app) - Proxy of the django.contrib.auth Permission model. - Adds the 'kfet' manager which returns only kfet-related permissions. KeepUnselectableModelFormMixin - Helps to keep the unselectable items of many-to-many field for ModelForm. - 'kfetauth' forms (related to KFetGroup) use this mixin. Using KFetGroup allows to simplify the 'kfet/account_group_form.html' template. A bug is also fixed in 'kfet/form_field_snippet.html', which could lead to prevent field displays if they used CheckboxSelectMultiple widget.
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('auth', '0006_require_contenttypes_0002'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='GenericTeamToken',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
|
|
('token', models.CharField(unique=True, max_length=50)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Group',
|
|
fields=[
|
|
('group_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, auto_created=True, to='auth.Group')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Groupe',
|
|
'verbose_name_plural': 'Groupes',
|
|
},
|
|
bases=('auth.group',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='Permission',
|
|
fields=[
|
|
],
|
|
options={
|
|
'verbose_name': 'Permission',
|
|
'verbose_name_plural': 'Permissions',
|
|
'proxy': True,
|
|
},
|
|
bases=('auth.permission',),
|
|
),
|
|
]
|