Merge migrations from master and supportBDS

- Add missing migrations
- Fix dependencies
- rename gestioncof -> cof
This commit is contained in:
Martin Pépin 2017-10-26 11:06:17 +02:00
parent 63963ce1f0
commit 9409b55df5
13 changed files with 131 additions and 16 deletions

View 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',
),
]

View file

@ -1,16 +1,15 @@
# -*- coding: utf-8 -*-
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cof', '0011_move_event'),
('cof', '0009_delete_clipper'),
]
operations = [
migrations.DeleteModel(
name='Clipper',
),
migrations.DeleteModel(
name='CustomMail',
),

View 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),
),
]

View 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',
),
]

View 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 = [
]

View 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')
]),
),
]

View file

@ -61,8 +61,11 @@ class Migration(migrations.Migration):
"""
dependencies = [
('cof', '0008_py3'),
('cof', '0013_pei'),
('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 = [

View file

@ -42,7 +42,7 @@ class Migration(migrations.Migration):
"""
dependencies = [
('cof', '0009_move_profile'),
('cof', '0014_move_profile'),
('gestion', '0002_create_cof_bds'),
]

View file

@ -62,7 +62,7 @@ def event_to_gestion(apps, schema_editor):
class Migration(migrations.Migration):
dependencies = [
('cof', '0010_move_club'),
('cof', '0015_move_club'),
('gestion', '0002_create_cof_bds'),
]

View file

@ -9,7 +9,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cof', '0012_remove_clipper_custommail'),
('cof', '0016_move_event'),
]
operations = [

View file

@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
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.
"""
User = apps.get_model('auth', 'User')
CofProfile = apps.get_model('gestioncof', 'CofProfile')
CofProfile = apps.get_model('cof', 'CofProfile')
Account = apps.get_model('kfet', 'Account')
user, _ = User.objects.update_or_create(

View file

@ -7,8 +7,8 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cof', '0009_move_profile'),
('kfet', '0047_auto_20170104_1528'),
('cof', '0014_move_profile'),
('kfet', '0061_add_perms_config'),
]
operations = [

View file

@ -35,7 +35,7 @@ class AccountManager(models.Manager):
def get_queryset(self):
"""Always append related data to this Account."""
return super().get_queryset().select_related('cofprofile__user',
return super().get_queryset().select_related('profile__user',
'negative')
def get_generic(self):