Skip to content

Commit

Permalink
changes in models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravichendraa committed Apr 16, 2024
2 parents 9fd34c7 + eb90711 commit cba0fd8
Show file tree
Hide file tree
Showing 142 changed files with 10,557 additions and 1,372 deletions.
6 changes: 4 additions & 2 deletions FusionIIIT/Fusion/middleware/custom_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def user_logged_in_handler(sender, user, request, **kwargs):
design = HoldsDesignation.objects.select_related('user','designation').filter(working=request.user)

designation=[]

designation.append(str(user.extrainfo.user_type))
if str(user.extrainfo.user_type) == "student":
designation.append(str(user.extrainfo.user_type))


for i in design:
if str(i.designation) != str(user.extrainfo.user_type):
print('-------')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.1.5 on 2023-03-15 18:53
# Generated by Django 3.1.5 on 2024-04-15 23:58

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -9,8 +9,8 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('programme_curriculum', '0001_initial'),
('globals', '0001_initial'),
('programme_curriculum', '0001_initial'),
]

operations = [
Expand Down Expand Up @@ -117,8 +117,8 @@ class Migration(migrations.Migration):
('batch', models.IntegerField(default=2016)),
('cpi', models.FloatField(default=0)),
('category', models.CharField(choices=[('GEN', 'General'), ('SC', 'Scheduled Castes'), ('ST', 'Scheduled Tribes'), ('OBC', 'Other Backward Classes')], max_length=10)),
('father_name', models.CharField(default='', max_length=40)),
('mother_name', models.CharField(default='', max_length=40)),
('father_name', models.CharField(default='', max_length=40, null=True)),
('mother_name', models.CharField(default='', max_length=40, null=True)),
('hall_no', models.IntegerField(default=0)),
('room_no', models.CharField(blank=True, max_length=10, null=True)),
('specialization', models.CharField(choices=[('Power and Control', 'Power and Control'), ('Microwave and Communication Engineering', 'Microwave and Communication Engineering'), ('Micro-nano Electronics', 'Micro-nano Electronics'), ('CAD/CAM', 'CAD/CAM'), ('Design', 'Design'), ('Manufacturing', 'Manufacturing'), ('CSE', 'CSE'), ('Mechatronics', 'Mechatronics'), ('MDes', 'MDes'), ('None', 'None')], default='', max_length=40, null=True)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.1.5 on 2023-03-15 18:53
# Generated by Django 3.1.5 on 2024-04-15 23:58

import datetime
from django.db import migrations, models
Expand All @@ -11,9 +11,9 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('globals', '0001_initial'),
('academic_information', '0001_initial'),
('programme_curriculum', '0001_initial'),
('globals', '0001_initial'),
]

operations = [
Expand Down Expand Up @@ -188,7 +188,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('month', models.CharField(choices=[('Jan', 'January'), ('Feb', 'Febuary'), ('Mar', 'March'), ('Apr', 'April'), ('May', 'May'), ('Jun', 'June'), ('Jul', 'July'), ('Aug', 'August'), ('Sep', 'September'), ('Oct', 'October'), ('Nov', 'November'), ('Dec', 'December')], max_length=10)),
('year', models.IntegerField(choices=[(2023, 2023), (2022, 2022)])),
('year', models.IntegerField(choices=[(2024, 2024), (2023, 2023)])),
('description', models.CharField(choices=[('Stu_paid', 'Paid'), ('Stu_due', 'Due')], max_length=15)),
('amount', models.IntegerField()),
('remaining_amount', models.IntegerField()),
Expand Down Expand Up @@ -243,7 +243,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('semester', models.IntegerField()),
('batch', models.IntegerField(default=2023)),
('batch', models.IntegerField(default=2024)),
('verified', models.BooleanField(default=False)),
('curr_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum')),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
Expand Down Expand Up @@ -334,7 +334,7 @@ class Migration(migrations.Migration):
name='course_registration',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('working_year', models.IntegerField(blank=True, choices=[(2023, 2023), (2022, 2022)], null=True)),
('working_year', models.IntegerField(blank=True, choices=[(2024, 2024), (2023, 2023)], null=True)),
('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.course')),
('course_slot_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='programme_curriculum.courseslot')),
('semester_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')),
Expand Down Expand Up @@ -374,7 +374,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateTimeField(auto_now_add=True)),
('month', models.CharField(choices=[('Jan', 'January'), ('Feb', 'Febuary'), ('Mar', 'March'), ('Apr', 'April'), ('May', 'May'), ('Jun', 'June'), ('Jul', 'July'), ('Aug', 'August'), ('Sep', 'September'), ('Oct', 'October'), ('Nov', 'November'), ('Dec', 'December')], max_length=10)),
('year', models.IntegerField(choices=[(2023, 2023), (2022, 2022)])),
('year', models.IntegerField(choices=[(2024, 2024), (2023, 2023)])),
('bank_account', models.CharField(max_length=11)),
('applicability', models.CharField(choices=[('GATE', 'GATE'), ('NET', 'NET'), ('CEED', 'CEED')], max_length=5)),
('ta_supervisor_remark', models.BooleanField(default=False)),
Expand All @@ -392,7 +392,7 @@ class Migration(migrations.Migration):
name='Register',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('year', models.IntegerField(default=2023)),
('year', models.IntegerField(default=2024)),
('semester', models.IntegerField()),
('curr_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum')),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
Expand All @@ -402,4 +402,4 @@ class Migration(migrations.Migration):
'unique_together': {('curr_id', 'student_id')},
},
),
]
]
94 changes: 66 additions & 28 deletions FusionIIIT/applications/central_mess/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.1.5 on 2023-03-15 18:53
# Generated by Django 3.1.5 on 2024-04-15 23:58

import applications.central_mess.models
import datetime
Expand All @@ -19,7 +19,7 @@ class Migration(migrations.Migration):
name='Menu',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mess_option', models.CharField(choices=[('mess1', 'Veg_mess'), ('mess2', 'Non_veg_mess')], default='mess2', max_length=20)),
('mess_option', models.CharField(choices=[('mess1', 'Mess1'), ('mess2', 'Mess2')], default='mess2', max_length=20)),
('meal_time', models.CharField(choices=[('MB', 'Monday Breakfast'), ('ML', 'Monday Lunch'), ('MD', 'Monday Dinner'), ('TB', 'Tuesday Breakfast'), ('TL', 'Tuesday Lunch'), ('TD', 'Tuesday Dinner'), ('WB', 'Wednesday Breakfast'), ('WL', 'Wednesday Lunch'), ('WD', 'Wednesday Dinner'), ('THB', 'Thursday Breakfast'), ('THL', 'Thursday Lunch'), ('THD', 'Thursday Dinner'), ('FB', 'Friday Breakfast'), ('FL', 'Friday Lunch'), ('FD', 'Friday Dinner'), ('SB', 'Saturday Breakfast'), ('SL', 'Saturday Lunch'), ('SD', 'Saturday Dinner'), ('SUB', 'Sunday Breakfast'), ('SUL', 'Sunday Lunch'), ('SUD', 'Sunday Dinner')], max_length=20)),
('dish', models.CharField(max_length=200)),
],
Expand Down Expand Up @@ -51,15 +51,6 @@ class Migration(migrations.Migration):
('timestamp', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='Nonveg_menu',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('dish', models.CharField(max_length=20)),
('price', models.IntegerField()),
('order_interval', models.CharField(choices=[('Breakfast', 'Breakfast'), ('Lunch', 'Lunch'), ('Dinner', 'Dinner')], default='Breakfast', max_length=20)),
],
),
migrations.CreateModel(
name='Vacation_food',
fields=[
Expand All @@ -80,33 +71,68 @@ class Migration(migrations.Migration):
('end_date', models.DateField(default=datetime.date.today)),
('request', models.TextField()),
('status', models.CharField(choices=[('0', 'rejected'), ('1', 'pending'), ('2', 'accepted')], default='1', max_length=20)),
('item1', models.CharField(max_length=50)),
('item2', models.CharField(max_length=50)),
('item1', models.CharField(choices=[('dal_chawal', 'Dal Chawal'), ('khicdi', 'Khicdi'), ('tomato_soup', 'Tomato Soup')], default='dal_chawal', max_length=50)),
('item2', models.CharField(choices=[('breakfast', 'Breakfast'), ('lunch', 'Lunch'), ('dinner', 'Dinner')], default='breakfast', max_length=50)),
('app_date', models.DateField(default=datetime.date.today)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Rebate',
name='Semdates',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateField(default=datetime.date.today)),
('end_date', models.DateField(default=datetime.date.today)),
('purpose', models.TextField()),
('status', models.CharField(choices=[('0', 'rejected'), ('1', 'pending'), ('2', 'accepted')], default='1', max_length=20)),
('app_date', models.DateField(default=datetime.date.today)),
('leave_type', models.CharField(choices=[('casual', 'Casual'), ('vacation', 'Vacation')], default='casual', max_length=20)),
],
options={
'unique_together': {('start_date', 'end_date')},
},
),
migrations.CreateModel(
name='Registration_Request',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Txn_no', models.CharField(max_length=20)),
('img', models.ImageField(default=None, upload_to='images/')),
('amount', models.IntegerField(default=0)),
('status', models.CharField(default='pending', max_length=10)),
('registration_remark', models.CharField(default='NA', max_length=50)),
('start_date', models.DateField(default=None, null=True)),
('payment_date', models.DateField(default=None, null=True)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Reg_records',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateField(default=datetime.date.today)),
('end_date', models.DateField(default=None, null=True)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Nonveg_data',
name='Reg_main',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('order_date', models.DateField(default=datetime.date.today)),
('order_interval', models.CharField(choices=[('Breakfast', 'Breakfast'), ('Lunch', 'Lunch'), ('Dinner', 'Dinner')], default='Breakfast', max_length=20)),
('program', models.CharField(max_length=10)),
('current_mess_status', models.CharField(default='Deregistered', max_length=20)),
('balance', models.IntegerField(default=0)),
('mess_option', models.CharField(default='mess2', max_length=20)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Rebate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateField(default=datetime.date.today)),
('end_date', models.DateField(default=datetime.date.today)),
('purpose', models.TextField()),
('status', models.CharField(choices=[('0', 'rejected'), ('1', 'pending'), ('2', 'accepted')], default='1', max_length=20)),
('app_date', models.DateField(default=datetime.date.today)),
('dish', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='central_mess.nonveg_menu')),
('leave_type', models.CharField(choices=[('casual', 'Casual'), ('vacation', 'Vacation')], default='casual', max_length=20)),
('rebate_remark', models.CharField(default='NA', max_length=50)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
Expand Down Expand Up @@ -134,25 +160,37 @@ class Migration(migrations.Migration):
name='Feedback',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mess', models.CharField(choices=[('mess1', 'Veg_mess'), ('mess2', 'Non_veg_mess')], default='mess1', max_length=10)),
('mess', models.CharField(choices=[('mess1', 'Mess1'), ('mess2', 'Mess2')], default='mess1', max_length=10)),
('mess_rating', models.PositiveSmallIntegerField(default='5')),
('fdate', models.DateField(default=datetime.date.today)),
('description', models.TextField()),
('feedback_type', models.CharField(choices=[('maintenance', 'Maintenance'), ('food', 'Food'), ('cleanliness', 'Cleanliness & Hygiene'), ('others', 'Others')], max_length=20)),
('feedback_remark', models.CharField(default='NA', max_length=50)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Deregistration_Request',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status', models.CharField(default='pending', max_length=10)),
('deregistration_remark', models.CharField(default='NA', max_length=50)),
('end_date', models.DateField(default=None, null=True)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
),
migrations.CreateModel(
name='Payments',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sem', models.IntegerField()),
('year', models.IntegerField(default=applications.central_mess.models.current_year)),
('amount_paid', models.IntegerField(default=0)),
('payment_month', models.CharField(default=applications.central_mess.models.current_month, max_length=20)),
('payment_year', models.IntegerField(default=applications.central_mess.models.current_year)),
('payment_date', models.DateField(default=datetime.date(2024, 4, 15))),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
options={
'unique_together': {('student_id', 'sem', 'year')},
'unique_together': {('student_id', 'payment_date')},
},
),
migrations.CreateModel(
Expand All @@ -164,8 +202,8 @@ class Migration(migrations.Migration):
('amount', models.IntegerField(default=0)),
('rebate_count', models.IntegerField(default=0)),
('rebate_amount', models.IntegerField(default=0)),
('nonveg_total_bill', models.IntegerField(default=0)),
('total_bill', models.IntegerField(default=0)),
('paid', models.BooleanField(default=False)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
options={
Expand All @@ -176,7 +214,7 @@ class Migration(migrations.Migration):
name='Messinfo',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mess_option', models.CharField(choices=[('mess1', 'Veg_mess'), ('mess2', 'Non_veg_mess')], default='mess2', max_length=20)),
('mess_option', models.CharField(choices=[('mess1', 'Mess1'), ('mess2', 'Mess2')], default='mess2', max_length=20)),
('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')),
],
options={
Expand Down
Loading

0 comments on commit cba0fd8

Please sign in to comment.