This commit is contained in:
sankalp committed 2025-01-08 21:15:45 +05:45
1 parent c738c1746a
commit 0504b881fb
30 files changed
+1297 -123

No files matched your search

@@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-08 05:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='library',
old_name='author',
new_name='publication',
),
]
@@ -0,0 +1,72 @@
# Generated by Django 5.1.4 on 2025-01-08 07:33
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0002_rename_author_library_publication'),
]
operations = [
migrations.AlterField(
model_name='course',
name='level',
field=models.CharField(choices=[('basic', 'Basic'), ('primary', 'Primary'), ('secondary', 'Secondary'), ('vocational traning', 'Vocational Traning'), ('higher secondary', 'Higher Secondary'), ('graduation', 'Graduation'), ('post graduation', 'Post Graduation')], max_length=45),
),
migrations.AlterField(
model_name='staff',
name='position',
field=models.CharField(choices=[('lab Assistant', 'Lab Assistant'), ('librarian', 'Librarian'), ('accountant', 'Accountant'), ('guard', 'Guard'), ('driver', 'Driver'), ('helper', 'Helper'), ('cleaner', 'Cleaner')], max_length=255),
),
migrations.AlterField(
model_name='student',
name='father_occupation',
field=models.CharField(choices=[('agriculture', 'Agriculture'), ('banker', 'Banker'), ('business', 'Business'), ('doctor', 'Doctor'), ('farmer', 'Farmer'), ('fisherman', 'Fisherman'), ('public service', 'Public Service'), ('private service', 'Private Service'), ('shopkeeper', 'Shopkeeper'), ('driver', 'Driver'), ('worker', 'Worker'), ('N/A', 'N/A')], default='N/A', max_length=45),
),
migrations.AlterField(
model_name='student',
name='mother_occupation',
field=models.CharField(choices=[('agriculture', 'Agriculture'), ('banker', 'Banker'), ('business', 'Business'), ('doctor', 'Doctor'), ('farmer', 'Farmer'), ('fisherman', 'Fisherman'), ('public service', 'Public Service'), ('private service', 'Private Service'), ('shopkeeper', 'Shopkeeper'), ('driver', 'Driver'), ('houseWife', 'HouseWife'), ('worker', 'Worker'), ('N/A', 'N/A')], default='N/A', max_length=45),
),
migrations.AlterField(
model_name='student',
name='relationship_with_student',
field=models.CharField(choices=[('father', 'Father'), ('mother', 'Mother'), ('brother', 'Brother'), ('sister', 'Sister'), ('uncle', 'Uncle'), ('aunt', 'Aunt'), ('grandfather', 'Grandfather')], max_length=45),
),
migrations.CreateModel(
name='Certificate',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('title', models.CharField(max_length=255)),
('description', models.TextField(blank=True, null=True)),
('issue_date', models.DateField(auto_now_add=True)),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.course')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.student')),
],
options={
'verbose_name': 'Certificate',
'verbose_name_plural': 'Certificate',
},
),
migrations.CreateModel(
name='Marksheet',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('marks_obtained', models.DecimalField(decimal_places=2, max_digits=5)),
('total_marks', models.DecimalField(decimal_places=2, max_digits=5)),
('grade', models.CharField(blank=True, max_length=2, null=True)),
('exam_date', models.DateField()),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='marksheets', to='app.course')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='marksheets', to='app.student')),
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='marksheets', to='app.subject')),
],
options={
'verbose_name': 'Marksheet',
'verbose_name_plural': 'Marksheets',
'unique_together': {('student', 'course', 'subject')},
},
),
]
@@ -0,0 +1,34 @@
# Generated by Django 5.1.4 on 2025-01-08 07:39
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_alter_course_level_alter_staff_position_and_more'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='exam_date',
field=models.DateField(help_text='Date of the examination'),
),
migrations.AlterField(
model_name='marksheet',
name='grade',
field=models.CharField(blank=True, choices=[('A+', 'Excellent'), ('A', 'Very Good'), ('B', 'Good'), ('C', 'Average'), ('D', 'Below Average'), ('F', 'Fail')], help_text='Grade assigned based on marks', max_length=2, null=True),
),
migrations.AlterField(
model_name='marksheet',
name='marks_obtained',
field=models.PositiveIntegerField(help_text='Marks obtained by the student', validators=[django.core.validators.MinValueValidator(0)]),
),
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(help_text='Total marks for the subject', validators=[django.core.validators.MinValueValidator(1)]),
),
]
@@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-08 07:51
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0004_alter_marksheet_exam_date_alter_marksheet_grade_and_more'),
]
operations = [
migrations.AddField(
model_name='marksheet',
name='subj_result',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app.result'),
),
]
@@ -0,0 +1,25 @@
# Generated by Django 5.1.4 on 2025-01-08 07:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0005_marksheet_subj_result'),
]
operations = [
migrations.AlterUniqueTogether(
name='marksheet',
unique_together={('student', 'course')},
),
migrations.RemoveField(
model_name='marksheet',
name='exam_date',
),
migrations.RemoveField(
model_name='marksheet',
name='subject',
),
]
@@ -0,0 +1,46 @@
# Generated by Django 5.1.4 on 2025-01-08 08:29
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0006_alter_marksheet_unique_together_and_more'),
]
operations = [
migrations.RemoveField(
model_name='marksheet',
name='marks_obtained',
),
migrations.RemoveField(
model_name='marksheet',
name='subj_result',
),
migrations.AddField(
model_name='marksheet',
name='obtained_marks',
field=models.PositiveIntegerField(default=0, help_text='Total marks obtained by the student', validators=[django.core.validators.MinValueValidator(0)]),
),
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)]),
),
migrations.CreateModel(
name='SubjectMark',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('marks_obtained', models.PositiveIntegerField(help_text='Marks obtained in this subject', validators=[django.core.validators.MinValueValidator(0)])),
('total_marks', models.PositiveIntegerField(help_text='Total marks for this subject', validators=[django.core.validators.MinValueValidator(1)])),
('marksheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subject_marks', to='app.marksheet')),
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subject_marks', to='app.subject')),
],
options={
'unique_together': {('marksheet', 'subject')},
},
),
]
@@ -0,0 +1,43 @@
# Generated by Django 5.1.4 on 2025-01-08 08:42
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0007_remove_marksheet_marks_obtained_and_more'),
]
operations = [
migrations.RemoveField(
model_name='subjectmark',
name='marks_obtained',
),
migrations.AddField(
model_name='subjectmark',
name='obtained_practical_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5),
),
migrations.AddField(
model_name='subjectmark',
name='obtained_theory_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5),
),
migrations.AddField(
model_name='subjectmark',
name='total_practical_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('20.00'), max_digits=5),
),
migrations.AddField(
model_name='subjectmark',
name='total_theory_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('80.00'), max_digits=5),
),
migrations.AlterField(
model_name='subjectmark',
name='total_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), editable=False, max_digits=5),
),
]
@@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-08 08:43
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0008_remove_subjectmark_marks_obtained_and_more'),
]
operations = [
migrations.AlterField(
model_name='subjectmark',
name='total_marks',
field=models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5),
),
]
@@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-08 08:51
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0009_alter_subjectmark_total_marks'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(default=0, help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)]),
),
]
@@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-08 08:53
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0010_alter_marksheet_total_marks'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)]),
),
]
@@ -0,0 +1,25 @@
# Generated by Django 5.1.4 on 2025-01-08 09:01
import django.core.validators
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0011_alter_marksheet_total_marks'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='obtained_marks',
field=models.PositiveIntegerField(default=Decimal('0.00'), editable=False, help_text='Total marks obtained by the student', validators=[django.core.validators.MinValueValidator(0)]),
),
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(default=Decimal('0.00'), editable=False, help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)]),
),
]
@@ -0,0 +1,30 @@
# Generated by Django 5.1.4 on 2025-01-08 09:16
import django.core.validators
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0012_alter_marksheet_obtained_marks_and_more'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='grade',
field=models.CharField(blank=True, choices=[('A+', 'Excellent'), ('A', 'Very Good'), ('B+', 'Good'), ('B', ''), ('C+', 'Average'), ('C', ''), ('D+', 'Below Average'), ('D', 'Fail')], help_text='Grade assigned based on marks', max_length=2, null=True),
),
migrations.AlterField(
model_name='marksheet',
name='obtained_marks',
field=models.PositiveIntegerField(default=Decimal('0.00'), help_text='Total marks obtained by the student', validators=[django.core.validators.MinValueValidator(0)]),
),
migrations.AlterField(
model_name='marksheet',
name='total_marks',
field=models.PositiveIntegerField(default=Decimal('0.00'), help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)]),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-08 09:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0013_alter_marksheet_grade_alter_marksheet_obtained_marks_and_more'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='grade',
field=models.CharField(blank=True, choices=[('A+', 'Excellent'), ('A', 'Very Good'), ('B+', 'Good'), ('B', 'G'), ('C+', 'Average'), ('C', 'A'), ('D+', 'Below Average'), ('D', 'Fail')], help_text='Grade assigned based on marks', max_length=2, null=True),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-08 09:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0014_alter_marksheet_grade'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='grade',
field=models.CharField(blank=True, choices=[('A+', 'Outstanding'), ('A', 'Excellent'), ('B+', 'Very Good'), ('B', 'Good'), ('C+', 'Above Average'), ('C', 'Average'), ('D', 'Below Average'), ('E', 'Fail')], help_text='Grade assigned based on marks', max_length=2, null=True),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-08 09:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0015_alter_marksheet_grade'),
]
operations = [
migrations.AlterField(
model_name='marksheet',
name='grade',
field=models.CharField(blank=True, choices=[('A+', 'A+'), ('A', 'A'), ('B+', 'B+'), ('B', 'B'), ('C+', 'C+'), ('C', 'C'), ('D', 'D'), ('E', 'E')], help_text='Grade assigned based on marks', max_length=2, null=True),
),
]