final-project

parent f6b64541
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-26 09:37
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Allocationcl',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'verbose_name_plural': 'Allocated Choice',
'verbose_name': 'Allocated Choice',
'ordering': ['applicant__rank'],
},
),
migrations.CreateModel(
name='Applicant',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('rank', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
('is_float', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('priority', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Applicant')),
],
options={
'ordering': ['priority'],
},
),
migrations.CreateModel(
name='Choice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('choice_name', models.CharField(max_length=200)),
('capacity', models.IntegerField()),
],
),
migrations.CreateModel(
name='Institute',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('is_allocated', models.BooleanField(default=False)),
],
options={
'verbose_name_plural': 'Institutes',
'verbose_name': 'Institute',
},
),
migrations.AddField(
model_name='choice',
name='institute',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='allocation.Institute'),
),
migrations.AddField(
model_name='application',
name='choice',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='alloted_choice',
field=models.ManyToManyField(related_name='alloted_applicant', through='allocation.Allocationcl', to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='choices',
field=models.ManyToManyField(related_name='applicants', through='allocation.Application', to='allocation.Choice'),
),
migrations.AddField(
model_name='applicant',
name='institute',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicants', to='allocation.Institute'),
),
migrations.AddField(
model_name='allocationcl',
name='applicant',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Applicant'),
),
migrations.AddField(
model_name='allocationcl',
name='choice',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='allocation.Choice'),
),
]
...@@ -43,5 +43,4 @@ ...@@ -43,5 +43,4 @@
<p>There are no applicants.</p> <p>There are no applicants.</p>
{% endif %} {% endif %}
<!-- {% endif %} -->
{% endblock %} {% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment