This commit is contained in:
sankalp committed 2025-01-10 14:09:32 +05:45
1 parent 0504b881fb
commit 36e08cc230
110 files changed
+18389 -870

No files matched your search

+61 -14
View File
@@ -1,4 +1,4 @@
# Generated by Django 5.1.4 on 2025-01-07 17:39
# Generated by Django 5.1.4 on 2025-01-09 17:58
import django.core.validators
import django.db.models.deletion
@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('level', 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)),
('level', 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)),
('course_type', models.CharField(choices=[('semester', 'Semester-based'), ('yearly', 'Yearly-based')], max_length=10)),
('duration', models.PositiveIntegerField()),
],
@@ -49,7 +49,7 @@ class Migration(migrations.Migration):
('category', models.CharField(max_length=255)),
('book_name', models.CharField(max_length=255)),
('description', models.CharField(max_length=255)),
('author', models.CharField(max_length=255)),
('publication', models.CharField(max_length=255)),
('publication_year', models.PositiveIntegerField()),
('quantity', models.PositiveIntegerField()),
('available', models.CharField(choices=[('Y', 'Yes'), ('N', 'NO')], max_length=1)),
@@ -83,11 +83,11 @@ class Migration(migrations.Migration):
('middle_name', models.CharField(blank=True, max_length=255, null=True)),
('last_name', models.CharField(max_length=255)),
('email', models.EmailField(max_length=255, unique=True)),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('username', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('password', models.CharField(max_length=255)),
('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
('position', models.CharField(choices=[('Lab Assistant', 'Lab Assistant'), ('Librarian', 'Librarian'), ('Accountant', 'Accountant'), ('Guard', 'Guard'), ('Driver', 'Driver'), ('Helper', 'Helper'), ('Cleaner', 'Cleaner')], max_length=255)),
('position', models.CharField(choices=[('lab Assistant', 'Lab Assistant'), ('librarian', 'Librarian'), ('accountant', 'Accountant'), ('guard', 'Guard'), ('driver', 'Driver'), ('helper', 'Helper'), ('cleaner', 'Cleaner')], max_length=255)),
('address', models.CharField(max_length=255)),
('marital_status', models.CharField(choices=[('married', 'Married'), ('widowed', 'Widowed'), ('separated', 'Separated'), ('divorced', 'Divorced'), ('single', 'Single')], max_length=10)),
('date_of_joining', models.DateField()),
@@ -108,24 +108,24 @@ class Migration(migrations.Migration):
('middle_name', models.CharField(blank=True, max_length=255, null=True)),
('last_name', models.CharField(max_length=255)),
('email', models.EmailField(max_length=255, unique=True)),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('username', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('password', models.CharField(max_length=255)),
('address', models.CharField(max_length=255)),
('date_of_birth', models.DateField()),
('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
('address', models.CharField(max_length=255)),
('father_name', models.CharField(max_length=100)),
('father_phone_no', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('father_phone_no', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('father_email', models.EmailField(blank=True, max_length=254, null=True)),
('father_occupation', 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)),
('father_occupation', 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)),
('mother_name', models.CharField(max_length=100)),
('mother_phone_no', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('mother_phone_no', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('mother_email', models.EmailField(blank=True, max_length=254, null=True)),
('mother_occupation', 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)),
('mother_occupation', 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)),
('guardian_name', models.CharField(max_length=100)),
('guardian_phone_no', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('guardian_phone_no', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('guardian_email', models.EmailField(blank=True, max_length=254, null=True)),
('relationship_with_student', models.CharField(choices=[('Father', 'Father'), ('Mother', 'Mother'), ('Brother', 'Brother'), ('Sister', 'Sister'), ('Uncle', 'Uncle'), ('Aunt', 'Aunt'), ('Grandfather', 'Grandfather')], max_length=45)),
('relationship_with_student', models.CharField(choices=[('father', 'Father'), ('mother', 'Mother'), ('brother', 'Brother'), ('sister', 'Sister'), ('uncle', 'Uncle'), ('aunt', 'Aunt'), ('grandfather', 'Grandfather')], max_length=45)),
('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.academicyear')),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.course')),
('group', models.ManyToManyField(blank=True, to='auth.group')),
@@ -136,6 +136,37 @@ class Migration(migrations.Migration):
'verbose_name_plural': 'Students',
},
),
migrations.CreateModel(
name='Marksheet',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('total_marks', models.PositiveIntegerField(default=Decimal('0.00'), help_text='Total marks for the course', validators=[django.core.validators.MinValueValidator(1)])),
('obtained_marks', models.PositiveIntegerField(default=Decimal('0.00'), help_text='Total marks obtained by the student', validators=[django.core.validators.MinValueValidator(0)])),
('grade', 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)),
('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')),
],
options={
'verbose_name': 'Marksheet',
'verbose_name_plural': 'Marksheets',
'unique_together': {('student', 'course')},
},
),
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='Subject',
fields=[
@@ -187,7 +218,7 @@ class Migration(migrations.Migration):
('middle_name', models.CharField(blank=True, max_length=255, null=True)),
('last_name', models.CharField(max_length=255)),
('email', models.EmailField(max_length=255, unique=True)),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\+?1?\\d{9,15}$')])),
('phone', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^\\d{10}$')])),
('username', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('password', models.CharField(max_length=255)),
('address', models.CharField(max_length=255)),
@@ -209,4 +240,20 @@ class Migration(migrations.Migration):
name='teacher',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subjects', to='app.teacher'),
),
migrations.CreateModel(
name='SubjectMark',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('obtained_practical_marks', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5)),
('total_practical_marks', models.DecimalField(decimal_places=2, default=Decimal('20.00'), max_digits=5)),
('obtained_theory_marks', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5)),
('total_theory_marks', models.DecimalField(decimal_places=2, default=Decimal('80.00'), max_digits=5)),
('total_marks', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5)),
('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')},
},
),
]