Club model implementation, various other changes

This commit is contained in:
Skia
2016-01-29 15:20:00 +01:00
parent 7f4955d15c
commit 4322318c31
26 changed files with 267 additions and 204 deletions

View File

@ -2,34 +2,44 @@
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.contrib.auth.models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20160128_0842'),
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Member',
fields=[
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, primary_key=True, serialize=False)),
],
),
migrations.CreateModel(
name='Subscription',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('subscription_type', models.CharField(choices=[('cursus-branche', 'Cursus Branche'), ('cursus-tronc-commun', 'Cursus Tronc Commun'), ('deux-semestres', 'Deux semestres'), ('un-semestre', 'Un semestre')], verbose_name='subscription type', max_length=255)),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
('subscription_type', models.CharField(choices=[('cursus-branche', 'Cursus Branche'), ('cursus-tronc-commun', 'Cursus Tronc Commun'), ('deux-semestres', 'Deux semestres'), ('un-semestre', 'Un semestre')], max_length=255, verbose_name='subscription type')),
('subscription_start', models.DateField(verbose_name='subscription start')),
('subscription_end', models.DateField(verbose_name='subscription end')),
('payment_method', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('other', 'Autre')], verbose_name='payment method', max_length=255)),
('member', models.ForeignKey(to='subscription.Member', related_name='subscriptions')),
('payment_method', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('other', 'Autre')], max_length=255, verbose_name='payment method')),
],
options={
'ordering': ['subscription_start'],
},
),
migrations.CreateModel(
name='Subscriber',
fields=[
],
options={
'proxy': True,
},
bases=('core.user',),
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.AddField(
model_name='subscription',
name='member',
field=models.ForeignKey(related_name='subscriptions', to='subscription.Subscriber'),
),
]