forked from DGNum/gestioCOF
Merge migrations from master and supportBDS
- Add missing migrations - Fix dependencies - rename gestioncof -> cof
This commit is contained in:
parent
63963ce1f0
commit
9409b55df5
13 changed files with 131 additions and 16 deletions
17
cof/migrations/0009_delete_clipper.py
Normal file
17
cof/migrations/0009_delete_clipper.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cof', '0008_py3'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Clipper',
|
||||||
|
),
|
||||||
|
]
|
|
@ -1,16 +1,15 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0011_move_event'),
|
('cof', '0009_delete_clipper'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.DeleteModel(
|
|
||||||
name='Clipper',
|
|
||||||
),
|
|
||||||
migrations.DeleteModel(
|
migrations.DeleteModel(
|
||||||
name='CustomMail',
|
name='CustomMail',
|
||||||
),
|
),
|
19
cof/migrations/0011_longer_clippers.py
Normal file
19
cof/migrations/0011_longer_clippers.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cof', '0010_delete_custommail'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cofprofile',
|
||||||
|
name='login_clipper',
|
||||||
|
field=models.CharField(verbose_name='Login clipper', blank=True, max_length=32),
|
||||||
|
),
|
||||||
|
]
|
18
cof/migrations/0011_remove_cofprofile_num.py
Normal file
18
cof/migrations/0011_remove_cofprofile_num.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cof', '0010_delete_custommail'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='cofprofile',
|
||||||
|
name='num',
|
||||||
|
),
|
||||||
|
]
|
15
cof/migrations/0012_merge.py
Normal file
15
cof/migrations/0012_merge.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cof', '0011_remove_cofprofile_num'),
|
||||||
|
('cof', '0011_longer_clippers'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
47
cof/migrations/0013_pei.py
Normal file
47
cof/migrations/0013_pei.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cof', '0012_merge'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cofprofile',
|
||||||
|
name='occupation',
|
||||||
|
field=models.CharField(
|
||||||
|
verbose_name='Occupation',
|
||||||
|
max_length=9,
|
||||||
|
default='1A',
|
||||||
|
choices=[
|
||||||
|
('exterieur', 'Extérieur'),
|
||||||
|
('1A', '1A'),
|
||||||
|
('2A', '2A'),
|
||||||
|
('3A', '3A'),
|
||||||
|
('4A', '4A'),
|
||||||
|
('archicube', 'Archicube'),
|
||||||
|
('doctorant', 'Doctorant'),
|
||||||
|
('CST', 'CST'),
|
||||||
|
('PEI', 'PEI')
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cofprofile',
|
||||||
|
name='type_cotiz',
|
||||||
|
field=models.CharField(
|
||||||
|
verbose_name='Type de cotisation',
|
||||||
|
max_length=9,
|
||||||
|
default='normalien',
|
||||||
|
choices=[
|
||||||
|
('etudiant', 'Normalien étudiant'),
|
||||||
|
('normalien', 'Normalien élève'),
|
||||||
|
('exterieur', 'Extérieur'),
|
||||||
|
('gratis', 'Gratuit')
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
]
|
|
@ -61,8 +61,11 @@ class Migration(migrations.Migration):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0008_py3'),
|
('cof', '0013_pei'),
|
||||||
('gestion', '0002_create_cof_bds'),
|
('gestion', '0002_create_cof_bds'),
|
||||||
|
# Migrate the K-Fêt app up to the pre-BDS state before performing the
|
||||||
|
# BDS-related stuff
|
||||||
|
('kfet', '0061_add_perms_config'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
|
@ -42,7 +42,7 @@ class Migration(migrations.Migration):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0009_move_profile'),
|
('cof', '0014_move_profile'),
|
||||||
('gestion', '0002_create_cof_bds'),
|
('gestion', '0002_create_cof_bds'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -62,7 +62,7 @@ def event_to_gestion(apps, schema_editor):
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0010_move_club'),
|
('cof', '0015_move_club'),
|
||||||
('gestion', '0002_create_cof_bds'),
|
('gestion', '0002_create_cof_bds'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -9,7 +9,7 @@ import django.db.models.deletion
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0012_remove_clipper_custommail'),
|
('cof', '0016_move_event'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
|
@ -1,7 +1,4 @@
|
||||||
# -*- coding: utf-8 -*-
|
from django.db import migrations
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
from kfet.auth import KFET_GENERIC_TRIGRAMME, KFET_GENERIC_USERNAME
|
from kfet.auth import KFET_GENERIC_TRIGRAMME, KFET_GENERIC_USERNAME
|
||||||
|
|
||||||
|
@ -16,7 +13,7 @@ def setup_kfet_generic_user(apps, schema_editor):
|
||||||
See also setup_kfet_generic_user from kfet.auth.utils module.
|
See also setup_kfet_generic_user from kfet.auth.utils module.
|
||||||
"""
|
"""
|
||||||
User = apps.get_model('auth', 'User')
|
User = apps.get_model('auth', 'User')
|
||||||
CofProfile = apps.get_model('gestioncof', 'CofProfile')
|
CofProfile = apps.get_model('cof', 'CofProfile')
|
||||||
Account = apps.get_model('kfet', 'Account')
|
Account = apps.get_model('kfet', 'Account')
|
||||||
|
|
||||||
user, _ = User.objects.update_or_create(
|
user, _ = User.objects.update_or_create(
|
||||||
|
|
|
@ -7,8 +7,8 @@ from django.db import migrations, models
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cof', '0009_move_profile'),
|
('cof', '0014_move_profile'),
|
||||||
('kfet', '0047_auto_20170104_1528'),
|
('kfet', '0061_add_perms_config'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
|
@ -35,7 +35,7 @@ class AccountManager(models.Manager):
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
"""Always append related data to this Account."""
|
"""Always append related data to this Account."""
|
||||||
return super().get_queryset().select_related('cofprofile__user',
|
return super().get_queryset().select_related('profile__user',
|
||||||
'negative')
|
'negative')
|
||||||
|
|
||||||
def get_generic(self):
|
def get_generic(self):
|
||||||
|
|
Loading…
Reference in a new issue