diff --git a/.gitignore b/.gitignore index 497fd7a16..d5697ea97 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ node_modules/ FusionIIIT/static/ package-lock.json +# **/**/migrations/* \ No newline at end of file diff --git a/FusionIIIT/Fusion/context_processors.py b/FusionIIIT/Fusion/context_processors.py new file mode 100644 index 000000000..54566d56e --- /dev/null +++ b/FusionIIIT/Fusion/context_processors.py @@ -0,0 +1,5 @@ +def global_vars(request): + return { + 'global_var': request.session.get('currentDesignationSelected', 'default_value'), + 'global_var2': request.session.get('allDesignations', 'default_value2'), + } \ No newline at end of file diff --git a/FusionIIIT/Fusion/middleware/custom_middleware.py b/FusionIIIT/Fusion/middleware/custom_middleware.py new file mode 100644 index 000000000..f77873534 --- /dev/null +++ b/FusionIIIT/Fusion/middleware/custom_middleware.py @@ -0,0 +1,48 @@ +# custom_middleware.py +from django.contrib.auth.signals import user_logged_in +from django.dispatch import receiver +from applications.globals.models import (ExtraInfo, Feedback, HoldsDesignation, + Issue, IssueImage, DepartmentInfo) +from django.shortcuts import get_object_or_404, redirect, render + +def user_logged_in_middleware(get_response): + @receiver(user_logged_in) + def user_logged_in_handler(sender, user, request, **kwargs): + if 'function_executed' not in request.session: + # Run the function only if the flag is not set + # Assuming user is a model with the desired data field, retrieve the data + # For example, if your User model has a field named 'custom_field', you can access it like: + if user.is_authenticated: + desig = list(HoldsDesignation.objects.select_related('user','working','designation').all().filter(working = request.user).values_list('designation')) + print(desig) + b = [i for sub in desig for i in sub] + design = HoldsDesignation.objects.select_related('user','designation').filter(working=request.user) + + designation=[] + + designation.append(str(user.extrainfo.user_type)) + for i in design: + if str(i.designation) != str(user.extrainfo.user_type): + print('-------') + print(i.designation) + print(user.extrainfo.user_type) + print('') + designation.append(str(i.designation)) + + for i in designation: + print(i) + + request.session['currentDesignationSelected'] = designation[0] + request.session['allDesignations'] = designation + print("logged iN") + + # Set the flag in the session to indicate that the function has bee+n executed + request.session['function_executed'] = True + + def middleware(request): + if request.user.is_authenticated: + user_logged_in_handler(request.user, request.user, request) + response = get_response(request) + return response + + return middleware \ No newline at end of file diff --git a/FusionIIIT/Fusion/settings/common.py b/FusionIIIT/Fusion/settings/common.py index b98ea6960..fabe81ec2 100644 --- a/FusionIIIT/Fusion/settings/common.py +++ b/FusionIIIT/Fusion/settings/common.py @@ -163,6 +163,7 @@ 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'Fusion.middleware.custom_middleware.user_logged_in_middleware', ] ROOT_URLCONF = 'Fusion.urls' @@ -178,6 +179,7 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'Fusion.context_processors.global_vars', ], }, }, diff --git a/FusionIIIT/Fusion/settings/development.py b/FusionIIIT/Fusion/settings/development.py index 6acc214c1..3c5a1323d 100644 --- a/FusionIIIT/Fusion/settings/development.py +++ b/FusionIIIT/Fusion/settings/development.py @@ -2,45 +2,40 @@ DEBUG = True -SECRET_KEY = '=&w9due426k@l^ju1=s1)fj1rnpf0ok8xvjwx+62_nc-f12-8(' +SECRET_KEY = "=&w9due426k@l^ju1=s1)fj1rnpf0ok8xvjwx+62_nc-f12-8(" -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ["*"] DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'fusionlab', - 'HOST': os.environ.get("DB_HOST", default='localhost'), - 'USER': 'fusion_admin', - 'PASSWORD': 'hello123', + "default": { + "ENGINE": "django.db.backends.postgresql_psycopg2", + "NAME": "fusionlab", + "HOST": os.environ.get("DB_HOST", default="localhost"), + "USER": "fusion_admin", + "PASSWORD": "hello123", } } REST_FRAMEWORK = { - 'DEFAULT_AUTHENTICATION_CLASSES': ( - 'rest_framework.authentication.TokenAuthentication', + "DEFAULT_AUTHENTICATION_CLASSES": ( + "rest_framework.authentication.TokenAuthentication", ), - 'DEFAULT_PERMISSION_CLASSES': ( - 'rest_framework.permissions.IsAuthenticated', - ) + "DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",), } if DEBUG: - MIDDLEWARE += ( - 'debug_toolbar.middleware.DebugToolbarMiddleware', - ) + MIDDLEWARE += ("debug_toolbar.middleware.DebugToolbarMiddleware",) INSTALLED_APPS += ( - 'debug_toolbar', - 'django_extensions', - ) - + "debug_toolbar", + "django_extensions", + ) ############################### # DJANGO_EXTENSIONS SETTINGS: # ############################### INTERNAL_IPS = [ - '127.0.0.1', + "127.0.0.1", ] ############################### @@ -51,5 +46,5 @@ SHELL_PLUS_PRINT_SQL = True DEBUG_TOOLBAR_CONFIG = { - 'INTERCEPT_REDIRECTS': False, + "INTERCEPT_REDIRECTS": False, } diff --git a/FusionIIIT/Fusion/urls.py b/FusionIIIT/Fusion/urls.py index 837bf776a..05ad120a1 100755 --- a/FusionIIIT/Fusion/urls.py +++ b/FusionIIIT/Fusion/urls.py @@ -24,40 +24,38 @@ urlpatterns = [ - url(r'^', include('applications.globals.urls')), - url(r'^feeds/', include('applications.feeds.urls')), - url(r'^admin/', admin.site.urls), - url(r'^academic-procedures/', include('applications.academic_procedures.urls')), - url(r'^aims/', include('applications.academic_information.urls')), - url(r'^notifications/', include('applications.notifications_extension.urls')), - url(r'^estate/', include('applications.estate_module.urls')), - url(r'^dep/', include('applications.department.urls')), - url(r'^programme_curriculum/',include('applications.programme_curriculum.urls')), - url(r'^iwdModuleV2/', include('applications.iwdModuleV2.urls')), - url(r'^__debug__/', include(debug_toolbar.urls)), - url(r'^research_procedures/', include('applications.research_procedures.urls')), - url(r'^accounts/', include('allauth.urls')), - - - url(r'^eis/', include('applications.eis.urls')), - url(r'^mess/', include('applications.central_mess.urls')), - url(r'^complaint/', include('applications.complaint_system.urls')), - url(r'^healthcenter/', include('applications.health_center.urls')), - url(r'^leave/', include('applications.leave.urls')), - url(r'^placement/', include('applications.placement_cell.urls')), - url(r'^filetracking/', include('applications.filetracking.urls')), - url(r'^spacs/', include('applications.scholarships.urls')), - url(r'^visitorhostel/', include('applications.visitor_hostel.urls')), - url(r'^office/', include('applications.office_module.urls')), - url(r'^finance/', include('applications.finance_accounts.urls')), - url(r'^purchase-and-store/', include('applications.ps1.urls')), - url(r'^gymkhana/', include('applications.gymkhana.urls')), - url(r'^library/', include('applications.library.urls')), - url(r'^establishment/', include('applications.establishment.urls')), - url(r'^ocms/', include('applications.online_cms.urls')), - url(r'^counselling/', include('applications.counselling_cell.urls')), - url(r'^hostelmanagement/', include('applications.hostel_management.urls')), - url(r'^income-expenditure/', include('applications.income_expenditure.urls')), - url(r'^hr2/', include('applications.hr2.urls')), - url(r'^recruitment/', include('applications.recruitment.urls')), + url(r"^", include("applications.globals.urls")), + url(r"^feeds/", include("applications.feeds.urls")), + url(r"^admin/", admin.site.urls), + url(r"^academic-procedures/", include("applications.academic_procedures.urls")), + url(r"^aims/", include("applications.academic_information.urls")), + url(r"^notifications/", include("applications.notifications_extension.urls")), + url(r"^estate/", include("applications.estate_module.urls")), + url(r"^dep/", include("applications.department.urls")), + url(r"^programme_curriculum/", include("applications.programme_curriculum.urls")), + url(r"^iwdModuleV2/", include("applications.iwdModuleV2.urls")), + url(r"^__debug__/", include(debug_toolbar.urls)), + url(r"^research_procedures/", include("applications.research_procedures.urls")), + url(r"^accounts/", include("allauth.urls")), + url(r"^eis/", include("applications.eis.urls")), + url(r"^mess/", include("applications.central_mess.urls")), + url(r"^complaint/", include("applications.complaint_system.urls")), + url(r"^healthcenter/", include("applications.health_center.urls")), + url(r"^leave/", include("applications.leave.urls")), + url(r"^placement/", include("applications.placement_cell.urls")), + url(r"^filetracking/", include("applications.filetracking.urls")), + url(r"^spacs/", include("applications.scholarships.urls")), + url(r"^visitorhostel/", include("applications.visitor_hostel.urls")), + url(r"^office/", include("applications.office_module.urls")), + url(r"^finance/", include("applications.finance_accounts.urls")), + url(r"^purchase-and-store/", include("applications.ps1.urls")), + url(r"^gymkhana/", include("applications.gymkhana.urls")), + url(r"^library/", include("applications.library.urls")), + url(r"^establishment/", include("applications.establishment.urls")), + url(r"^ocms/", include("applications.online_cms.urls")), + url(r"^counselling/", include("applications.counselling_cell.urls")), + url(r"^hostelmanagement/", include("applications.hostel_management.urls")), + url(r"^income-expenditure/", include("applications.income_expenditure.urls")), + url(r"^hr2/", include("applications.hr2.urls")), + url(r"^recruitment/", include("applications.recruitment.urls")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/FusionIIIT/applications/academic_information/migrations/0001_initial.py b/FusionIIIT/applications/academic_information/migrations/0001_initial.py deleted file mode 100644 index f75d3119c..000000000 --- a/FusionIIIT/applications/academic_information/migrations/0001_initial.py +++ /dev/null @@ -1,182 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('programme_curriculum', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Calendar', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('from_date', models.DateField()), - ('to_date', models.DateField()), - ('description', models.CharField(max_length=40)), - ], - options={ - 'db_table': 'Calendar', - }, - ), - migrations.CreateModel( - name='Course', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course_name', models.CharField(max_length=600)), - ('course_details', models.TextField(max_length=500)), - ], - options={ - 'db_table': 'Course', - }, - ), - migrations.CreateModel( - name='Curriculum', - fields=[ - ('curriculum_id', models.AutoField(primary_key=True, serialize=False)), - ('course_code', models.CharField(max_length=20)), - ('credits', models.IntegerField()), - ('course_type', models.CharField(choices=[('Professional Core', 'Professional Core'), ('Professional Elective', 'Professional Elective'), ('Professional Lab', 'Professional Lab'), ('Engineering Science', 'Engineering Science'), ('Natural Science', 'Natural Science'), ('Humanities', 'Humanities'), ('Design', 'Design'), ('Manufacturing', 'Manufacturing'), ('Management Science', 'Management Science')], max_length=25)), - ('programme', models.CharField(choices=[('B.Tech', 'B.Tech'), ('B.Des', 'B.Des'), ('M.Tech', 'M.Tech'), ('M.Des', 'M.Des'), ('PhD', 'PhD')], max_length=10)), - ('branch', models.CharField(choices=[('CSE', 'CSE'), ('ECE', 'ECE'), ('ME', 'ME'), ('DESIGN', 'DESIGN'), ('Common', 'Common')], default='Common', max_length=10)), - ('batch', models.IntegerField()), - ('sem', models.IntegerField()), - ('optional', models.BooleanField(default=False)), - ('floated', models.BooleanField(default=False)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - options={ - 'db_table': 'Curriculum', - 'unique_together': {('course_code', 'batch', 'programme')}, - }, - ), - migrations.CreateModel( - name='Curriculum_Instructor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('chief_inst', models.BooleanField(default=False)), - ('curriculum_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum')), - ('instructor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'Curriculum_Instructor', - 'unique_together': {('curriculum_id', 'instructor_id')}, - }, - ), - migrations.CreateModel( - name='Exam_timetable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_date', models.DateField(auto_now_add=True)), - ('exam_time_table', models.FileField(upload_to='Administrator/academic_information/')), - ('batch', models.IntegerField(default='2016')), - ('programme', models.CharField(choices=[('B.Tech', 'B.Tech'), ('B.Des', 'B.Des'), ('M.Tech', 'M.Tech'), ('M.Des', 'M.Des'), ('PhD', 'PhD')], max_length=10)), - ], - options={ - 'db_table': 'Exam_Timetable', - }, - ), - migrations.CreateModel( - name='Holiday', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('holiday_date', models.DateField()), - ('holiday_name', models.CharField(max_length=40)), - ('holiday_type', models.CharField(choices=[('restricted', 'restricted'), ('closed', 'closed'), ('vacation', 'vacation')], default='restricted', max_length=30)), - ], - options={ - 'db_table': 'Holiday', - }, - ), - migrations.CreateModel( - name='Meeting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('venue', models.CharField(max_length=50)), - ('date', models.DateField()), - ('time', models.CharField(max_length=20)), - ('agenda', models.TextField()), - ('minutes_file', models.CharField(max_length=40)), - ], - options={ - 'db_table': 'Meeting', - }, - ), - migrations.CreateModel( - name='Student', - fields=[ - ('id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='globals.extrainfo')), - ('programme', models.CharField(choices=[('B.Tech', 'B.Tech'), ('B.Des', 'B.Des'), ('M.Tech', 'M.Tech'), ('M.Des', 'M.Des'), ('PhD', 'PhD')], max_length=10)), - ('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)), - ('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)), - ('curr_semester_no', models.IntegerField(default=1)), - ('batch_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.batch')), - ], - ), - migrations.CreateModel( - name='Timetable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_date', models.DateTimeField(auto_now_add=True)), - ('time_table', models.FileField(upload_to='Administrator/academic_information/')), - ('batch', models.IntegerField(default='2016')), - ('programme', models.CharField(choices=[('B.Tech', 'B.Tech'), ('B.Des', 'B.Des'), ('M.Tech', 'M.Tech'), ('M.Des', 'M.Des'), ('PhD', 'PhD')], max_length=10)), - ('branch', models.CharField(choices=[('CSE', 'CSE'), ('ECE', 'ECE'), ('ME', 'ME'), ('DESIGN', 'DESIGN'), ('Common', 'Common')], default='Common', max_length=10)), - ], - options={ - 'db_table': 'Timetable', - }, - ), - migrations.CreateModel( - name='Student_attendance', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('present', models.BooleanField(default=False)), - ('instructor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum_instructor')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Student_attendance', - }, - ), - migrations.CreateModel( - name='Grades', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('grade', models.CharField(max_length=4)), - ('verify', models.BooleanField(default=False)), - ('curriculum_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')), - ], - options={ - 'db_table': 'Grades', - }, - ), - migrations.CreateModel( - name='Spi', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sem', models.IntegerField()), - ('spi', models.FloatField(default=0)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Spi', - 'unique_together': {('student_id', 'sem')}, - }, - ), - ] diff --git a/FusionIIIT/applications/academic_information/migrations/__init__.py b/FusionIIIT/applications/academic_information/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/academic_procedures/migrations/0001_initial.py b/FusionIIIT/applications/academic_procedures/migrations/0001_initial.py deleted file mode 100644 index b873390df..000000000 --- a/FusionIIIT/applications/academic_procedures/migrations/0001_initial.py +++ /dev/null @@ -1,405 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ('programme_curriculum', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Assistantship_status', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('student_status', models.BooleanField()), - ('hod_status', models.BooleanField()), - ('account_status', models.BooleanField()), - ], - ), - migrations.CreateModel( - name='MinimumCredits', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester', models.IntegerField()), - ('credits', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='ThesisTopicProcess', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('research_area', models.CharField(max_length=50)), - ('thesis_topic', models.CharField(max_length=1000)), - ('submission_by_student', models.BooleanField(default=False)), - ('pending_supervisor', models.BooleanField(default=True)), - ('approval_supervisor', models.BooleanField(default=False)), - ('forwarded_to_hod', models.BooleanField(default=False)), - ('pending_hod', models.BooleanField(default=True)), - ('approval_by_hod', models.BooleanField(default=False)), - ('date', models.DateField(default=datetime.datetime.now)), - ('co_supervisor_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='thesistopicprocess_co_supervisor', to='globals.faculty')), - ('curr_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum')), - ('member1', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='thesistopicprocess_member1', to='globals.faculty')), - ('member2', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='thesistopicprocess_member2', to='globals.faculty')), - ('member3', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='thesistopicprocess_member3', to='globals.faculty')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ('supervisor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='thesistopicprocess_supervisor', to='globals.faculty')), - ], - options={ - 'db_table': 'ThesisTopicProcess', - }, - ), - migrations.CreateModel( - name='Thesis', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('topic', models.CharField(max_length=1000)), - ('reg_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ('supervisor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.faculty')), - ], - options={ - 'db_table': 'Thesis', - }, - ), - migrations.CreateModel( - name='TeachingCreditRegistration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('req_pending', models.BooleanField(default=True)), - ('course_completion', models.BooleanField(default=False)), - ('approved_course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_approved_course', to='academic_information.curriculum')), - ('curr_1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_curr1', to='academic_information.curriculum')), - ('curr_2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_curr2', to='academic_information.curriculum')), - ('curr_3', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_curr3', to='academic_information.curriculum')), - ('curr_4', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_curr4', to='academic_information.curriculum')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ('supervisor_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='teachingcreditregistration_supervisor_id', to='globals.faculty')), - ], - options={ - 'db_table': 'TeachingCreditRegistration', - }, - ), - migrations.CreateModel( - name='StudentRegistrationChecks', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pre_registration_flag', models.BooleanField(default=False)), - ('final_registration_flag', models.BooleanField(default=False)), - ('semester_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'StudentRegistrationChecks', - }, - ), - migrations.CreateModel( - name='StudentRegistrationCheck', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pre_registration_flag', models.BooleanField(default=False)), - ('final_registration_flag', models.BooleanField(default=False)), - ('semester', models.IntegerField(default=1)), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'StudentRegistrationCheck', - }, - ), - migrations.CreateModel( - name='SemesterMarks', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('q1', models.FloatField(default=None)), - ('mid_term', models.FloatField(default=None)), - ('q2', models.FloatField(default=None)), - ('end_term', models.FloatField(default=None)), - ('other', models.FloatField(default=None)), - ('grade', models.CharField(choices=[('O', 'O'), ('A+', 'A+'), ('A', 'A'), ('B+', 'B+'), ('B', 'B'), ('C+', 'C+'), ('C', 'C'), ('D+', 'D+'), ('D', 'D'), ('F', 'F'), ('S', 'S'), ('X', 'X')], max_length=5, null=True)), - ('curr_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.course')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'SemesterMarks', - }, - ), - migrations.CreateModel( - name='PhDProgressExamination', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('theme', models.CharField(max_length=50)), - ('seminar_date_time', models.DateTimeField()), - ('place', models.CharField(max_length=30)), - ('work_done', models.TextField()), - ('specific_contri_curr_semester', models.TextField()), - ('future_plan', models.TextField()), - ('details', models.FileField(upload_to='academic_procedure/Uploaded_document/PhdProgressDetails/')), - ('papers_published', models.IntegerField()), - ('presented_papers', models.IntegerField()), - ('papers_submitted', models.IntegerField()), - ('quality_of_work', models.CharField(choices=[('Excellent', 'Excellent'), ('Good', 'Good'), ('Satisfactory', 'Satisfactory'), ('Unsatisfactory', 'Unsatisfactory')], max_length=20)), - ('quantity_of_work', models.CharField(choices=[('Enough', 'Enough'), ('Just Sufficient', 'Just Sufficient'), ('Insufficient', 'Insufficient')], max_length=15)), - ('Overall_grade', models.CharField(choices=[('A+', 'A+'), ('A', 'A'), ('B+', 'B+'), ('B', 'B'), ('C+', 'C+'), ('C', 'C'), ('D+', 'D'), ('D', 'D'), ('F', 'F')], max_length=2)), - ('completion_period', models.IntegerField(null=True)), - ('panel_report', models.TextField(null=True)), - ('continuation_enhancement_assistantship', models.CharField(choices=[('yes', 'yes'), ('no', 'no'), ('not applicable', 'not applicable')], max_length=20, null=True)), - ('enhancement_assistantship', models.CharField(choices=[('yes', 'yes'), ('no', 'no'), ('not applicable', 'not applicable')], max_length=15, null=True)), - ('annual_progress_seminar', models.CharField(choices=[('Give again', 'Give again'), ('Not Applicable', 'Not Applicable'), ('Approved', 'Approved')], max_length=20, null=True)), - ('commments', models.TextField(null=True)), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='MTechGraduateSeminarReport', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('theme_of_work', models.TextField()), - ('date', models.DateField()), - ('place', models.CharField(max_length=30)), - ('time', models.TimeField()), - ('work_done_till_previous_sem', models.TextField()), - ('specific_contri_in_cur_sem', models.TextField()), - ('future_plan', models.TextField()), - ('brief_report', models.FileField(upload_to='academic_procedure/Uploaded_document/GraduateSeminarReport/')), - ('publication_submitted', models.IntegerField()), - ('publication_accepted', models.IntegerField()), - ('paper_presented', models.IntegerField()), - ('papers_under_review', models.IntegerField()), - ('quality_of_work', models.CharField(choices=[('Excellent', 'Excellent'), ('Good', 'Good'), ('Satisfactory', 'Satisfactory'), ('Unsatisfactory', 'Unsatisfactory')], max_length=20)), - ('quantity_of_work', models.CharField(choices=[('Enough', 'Enough'), ('Just Sufficient', 'Just Sufficient'), ('Insufficient', 'Insufficient')], max_length=15)), - ('Overall_grade', models.CharField(choices=[('A+', 'A+'), ('A', 'A'), ('B+', 'B+'), ('B', 'B'), ('C+', 'C+'), ('C', 'C'), ('D+', 'D'), ('D', 'D'), ('F', 'F')], max_length=2)), - ('panel_report', models.CharField(choices=[('Give again', 'Give again'), ('Not Applicable', 'Not Applicable'), ('Approved', 'Approved')], max_length=15)), - ('suggestion', models.TextField(null=True)), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='MessDue', - 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)])), - ('description', models.CharField(choices=[('Stu_paid', 'Paid'), ('Stu_due', 'Due')], max_length=15)), - ('amount', models.IntegerField()), - ('remaining_amount', models.IntegerField()), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='MarkSubmissionCheck', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('verified', models.BooleanField(default=False)), - ('submitted', models.BooleanField(default=False)), - ('announced', models.BooleanField(default=False)), - ('curr_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.course')), - ], - options={ - 'db_table': 'MarkSubmissionCheck', - }, - ), - migrations.CreateModel( - name='InitialRegistrations', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('timestamp', models.DateTimeField(default=django.utils.timezone.now)), - ('priority', models.IntegerField(blank=True, null=True)), - ('course_id', models.ForeignKey(blank=True, null=True, 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(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'InitialRegistrations', - }, - ), - migrations.CreateModel( - name='InitialRegistration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('timestamp', models.DateTimeField(default=django.utils.timezone.now)), - ('priority', models.IntegerField(blank=True, null=True)), - ('course_id', models.ForeignKey(blank=True, null=True, 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(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')), - ('student_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'InitialRegistration', - }, - ), - migrations.CreateModel( - name='FinalRegistrations', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester', models.IntegerField()), - ('batch', models.IntegerField(default=2023)), - ('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')), - ], - options={ - 'db_table': 'FinalRegistrations', - }, - ), - migrations.CreateModel( - name='FinalRegistration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('verified', models.BooleanField(default=False)), - ('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')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'FinalRegistration', - }, - ), - migrations.CreateModel( - name='FeePayments', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('mode', models.CharField(choices=[('Axis Easypay', 'Axis Easypay'), ('Subpaisa', 'Subpaisa'), ('NEFT', 'NEFT'), ('RTGS', 'RTGS'), ('Bank Challan', 'Bank Challan'), ('Edu Loan', 'Edu Loan')], max_length=20)), - ('transaction_id', models.CharField(max_length=40)), - ('fee_receipt', models.FileField(null=True, upload_to='fee_receipt/')), - ('deposit_date', models.DateField(default=datetime.date.today)), - ('utr_number', models.CharField(max_length=40, null=True)), - ('fee_paid', models.IntegerField(default=0)), - ('reason', models.CharField(max_length=20, null=True)), - ('actual_fee', models.IntegerField(default=0)), - ('semester_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'FeePayments', - }, - ), - migrations.CreateModel( - name='FeePayment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester', models.IntegerField(default=1)), - ('batch', models.IntegerField(default=2016)), - ('mode', models.CharField(choices=[('Axis Easypay', 'Axis Easypay'), ('Subpaisa', 'Subpaisa'), ('NEFT', 'NEFT'), ('RTGS', 'RTGS'), ('Bank Challan', 'Bank Challan'), ('Edu Loan', 'Edu Loan')], max_length=20)), - ('transaction_id', models.CharField(max_length=40)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Dues', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('mess_due', models.IntegerField()), - ('hostel_due', models.IntegerField()), - ('library_due', models.IntegerField()), - ('placement_cell_due', models.IntegerField()), - ('academic_due', models.IntegerField()), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Dues', - }, - ), - migrations.CreateModel( - name='CoursesMtech', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('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'), ('all', 'all')], max_length=40)), - ('c_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='CourseRequested', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.course')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'CourseRequested', - }, - ), - migrations.CreateModel( - 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)), - ('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')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'course_registration', - }, - ), - migrations.CreateModel( - name='BranchChange', - fields=[ - ('c_id', models.AutoField(primary_key=True, serialize=False)), - ('applied_date', models.DateField(default=datetime.datetime.now)), - ('branches', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.departmentinfo')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Bonafide', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('student_name', models.CharField(max_length=50)), - ('purpose', models.CharField(max_length=100)), - ('academic_year', models.CharField(max_length=15)), - ('enrolled_course', models.CharField(max_length=10)), - ('complaint_date', models.DateTimeField(default=django.utils.timezone.now)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Bonafide', - }, - ), - migrations.CreateModel( - name='AssistantshipClaim', - fields=[ - ('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)])), - ('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)), - ('thesis_supervisor_remark', models.BooleanField(default=False)), - ('hod_approval', models.BooleanField(default=False)), - ('acad_approval', models.BooleanField(default=False)), - ('account_approval', models.BooleanField(default=False)), - ('stipend', models.IntegerField(default=0)), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ('ta_supervisor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='TA_SUPERVISOR', to='globals.faculty')), - ('thesis_supervisor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='THESIS_SUPERVISOR', to='globals.faculty')), - ], - ), - migrations.CreateModel( - name='Register', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('year', models.IntegerField(default=2023)), - ('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')), - ], - options={ - 'db_table': 'Register', - 'unique_together': {('curr_id', 'student_id')}, - }, - ), - ] diff --git a/FusionIIIT/applications/academic_procedures/migrations/__init__.py b/FusionIIIT/applications/academic_procedures/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/central_mess/migrations/0001_initial.py b/FusionIIIT/applications/central_mess/migrations/0001_initial.py deleted file mode 100644 index 2a5bce41c..000000000 --- a/FusionIIIT/applications/central_mess/migrations/0001_initial.py +++ /dev/null @@ -1,186 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import applications.central_mess.models -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - 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)), - ('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)), - ], - ), - migrations.CreateModel( - name='Mess_meeting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meet_date', models.DateField()), - ('agenda', models.TextField()), - ('venue', models.TextField()), - ('meeting_time', models.CharField(choices=[('10', '10 a.m.'), ('11', '11 a.m.'), ('12', '12 p.m.'), ('13', '1 p.m.'), ('14', '2 p.m.'), ('15', '3 p.m.'), ('16', '4 p.m.'), ('17', '5 p.m.'), ('18', '6 p.m.'), ('19', '7 p.m.'), ('20', '8 p.m.'), ('21', '9 p.m.')], max_length=20)), - ], - ), - migrations.CreateModel( - name='Mess_reg', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sem', models.IntegerField(default='1')), - ('start_reg', models.DateField(default=datetime.date.today)), - ('end_reg', models.DateField(default=datetime.date.today)), - ], - ), - migrations.CreateModel( - name='MessBillBase', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('bill_amount', models.PositiveIntegerField(default=0)), - ('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=[ - ('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)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Special_request', - 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)), - ('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)), - ('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', - 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)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Nonveg_data', - 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)), - ('app_date', models.DateField(default=datetime.date.today)), - ('dish', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='central_mess.nonveg_menu')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Mess_minutes', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('mess_minutes', models.FileField(upload_to='central_mess/')), - ('meeting_date', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='central_mess.mess_meeting')), - ], - ), - migrations.CreateModel( - name='Menu_change_request', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('reason', models.TextField()), - ('request', models.CharField(max_length=100)), - ('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.menu')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - 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_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)), - ('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)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('student_id', 'sem', 'year')}, - }, - ), - migrations.CreateModel( - name='Monthly_bill', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('month', models.CharField(default=applications.central_mess.models.current_month, max_length=20)), - ('year', models.IntegerField(default=applications.central_mess.models.current_year)), - ('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)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('student_id', 'month', 'year')}, - }, - ), - migrations.CreateModel( - 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)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('student_id', 'mess_option')}, - }, - ), - ] diff --git a/FusionIIIT/applications/central_mess/migrations/__init__.py b/FusionIIIT/applications/central_mess/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/complaint_system/migrations/0001_initial.py b/FusionIIIT/applications/complaint_system/migrations/0001_initial.py deleted file mode 100644 index db74dd14d..000000000 --- a/FusionIIIT/applications/complaint_system/migrations/0001_initial.py +++ /dev/null @@ -1,67 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Caretaker', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('area', models.CharField(choices=[('hall-1', 'hall-1'), ('hall-3', 'hall-3'), ('hall-4', 'hall-4'), ('CC1', 'CC1'), ('CC2', 'CC2'), ('core_lab', 'core_lab'), ('LHTC', 'LHTC'), ('NR2', 'NR2'), ('Rewa_Residency', 'Rewa_Residency'), ('Maa Saraswati Hostel', 'Maa Saraswati Hostel'), ('Nagarjun Hostel', 'Nagarjun Hostel'), ('Panini Hostel', 'Panini Hostel')], default='hall-3', max_length=20)), - ('rating', models.IntegerField(default=0)), - ('myfeedback', models.CharField(default='this is my feedback', max_length=400)), - ('staff_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Workers', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=50)), - ('age', models.CharField(max_length=10)), - ('phone', models.BigIntegerField(blank=True)), - ('worker_type', models.CharField(choices=[('Electricity', 'Electricity'), ('carpenter', 'carpenter'), ('plumber', 'plumber'), ('garbage', 'garbage'), ('dustbin', 'dustbin'), ('internet', 'internet'), ('other', 'other')], default='internet', max_length=20)), - ('caretaker_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='complaint_system.caretaker')), - ], - ), - migrations.CreateModel( - name='Supervisor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('area', models.CharField(choices=[('hall-1', 'hall-1'), ('hall-3', 'hall-3'), ('hall-4', 'hall-4'), ('CC1', 'CC1'), ('CC2', 'CC2'), ('core_lab', 'core_lab'), ('LHTC', 'LHTC'), ('NR2', 'NR2'), ('Rewa_Residency', 'Rewa_Residency'), ('Maa Saraswati Hostel', 'Maa Saraswati Hostel'), ('Nagarjun Hostel', 'Nagarjun Hostel'), ('Panini Hostel', 'Panini Hostel')], max_length=20)), - ('sup_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='StudentComplain', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('complaint_date', models.DateTimeField(default=django.utils.timezone.now)), - ('complaint_finish', models.DateField(blank=True, null=True)), - ('complaint_type', models.CharField(choices=[('Electricity', 'Electricity'), ('carpenter', 'carpenter'), ('plumber', 'plumber'), ('garbage', 'garbage'), ('dustbin', 'dustbin'), ('internet', 'internet'), ('other', 'other')], default='internet', max_length=20)), - ('location', models.CharField(choices=[('hall-1', 'hall-1'), ('hall-3', 'hall-3'), ('hall-4', 'hall-4'), ('CC1', 'CC1'), ('CC2', 'CC2'), ('core_lab', 'core_lab'), ('LHTC', 'LHTC'), ('NR2', 'NR2'), ('Rewa_Residency', 'Rewa_Residency'), ('Maa Saraswati Hostel', 'Maa Saraswati Hostel'), ('Nagarjun Hostel', 'Nagarjun Hostel'), ('Panini Hostel', 'Panini Hostel')], max_length=20)), - ('specific_location', models.CharField(blank=True, max_length=50)), - ('details', models.CharField(max_length=100)), - ('status', models.IntegerField(default='0')), - ('remarks', models.CharField(default='Pending', max_length=300)), - ('flag', models.IntegerField(default='0')), - ('reason', models.CharField(blank=True, default='None', max_length=100)), - ('feedback', models.CharField(blank=True, max_length=500)), - ('upload_complaint', models.FileField(blank=True, upload_to='')), - ('comment', models.CharField(default='None', max_length=100)), - ('complainer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ('worker_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='complaint_system.workers')), - ], - ), - ] diff --git a/FusionIIIT/applications/complaint_system/migrations/__init__.py b/FusionIIIT/applications/complaint_system/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/counselling_cell/migrations/0001_initial.py b/FusionIIIT/applications/counselling_cell/migrations/0001_initial.py deleted file mode 100644 index b87618488..000000000 --- a/FusionIIIT/applications/counselling_cell/migrations/0001_initial.py +++ /dev/null @@ -1,111 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='CounsellingIssueCategory', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('category_id', models.CharField(max_length=40, unique=True)), - ('category', models.CharField(max_length=40)), - ], - ), - migrations.CreateModel( - name='CounsellingMeeting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meeting_date', models.DateField(default=datetime.date.today)), - ('meeting_time', models.CharField(choices=[('10', '10 a.m.'), ('11', '11 a.m.'), ('12', '12 p.m.'), ('13', '1 p.m.'), ('14', '2 p.m.'), ('15', '3 p.m.'), ('16', '4 p.m.'), ('17', '5 p.m.'), ('18', '6 p.m.'), ('19', '7 p.m.'), ('20', '8 p.m.'), ('21', '9 p.m.')], max_length=20)), - ('agenda', models.TextField()), - ('venue', models.CharField(max_length=20)), - ('student_invities', models.TextField(default=None, max_length=500)), - ('meeting_host', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='FacultyCounsellingTeam', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('faculty_position', models.CharField(choices=[('head_counsellor', 'Head Counsellor'), ('faculty_counsellor', 'Faculty Counsellor')], max_length=50)), - ('faculty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.faculty')), - ], - options={ - 'unique_together': {('faculty', 'faculty_position')}, - }, - ), - migrations.CreateModel( - name='StudentCounsellingTeam', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('student_position', models.CharField(choices=[('student_guide', 'Student Guide'), ('student_coordinator', 'Student Coordinator')], max_length=50)), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('student_id', 'student_position')}, - }, - ), - migrations.CreateModel( - name='StudentMeetingRequest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('requested_time', models.DateTimeField()), - ('description', models.TextField(max_length=1000)), - ('requested_meeting_status', models.CharField(choices=[('status_accepted', 'Accepted'), ('status_pending', 'Pending')], default='status_pending', max_length=20)), - ('recipient_reply', models.TextField(max_length=1000)), - ('requested_faculty_invitee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.facultycounsellingteam')), - ('requested_student_invitee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.studentcounsellingteam')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='StudentCounsellingInfo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('student', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ('student_guide', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.studentcounsellingteam')), - ], - ), - migrations.CreateModel( - name='CounsellingMinutes', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('counselling_minutes', models.FileField(upload_to='counselling_cell/')), - ('counselling_meeting', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.counsellingmeeting')), - ], - ), - migrations.CreateModel( - name='CounsellingIssue', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('issue_raised_date', models.DateTimeField(default=datetime.datetime.now)), - ('issue', models.TextField(max_length=500)), - ('issue_status', models.CharField(choices=[('status_unresolved', 'Unresolved'), ('status_resolved', 'Resolved'), ('status_inprogress', 'InProgress')], default='status_unresolved', max_length=20)), - ('response_remark', models.TextField(max_length=500, null=True)), - ('issue_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.counsellingissuecategory')), - ('resolved_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='CounsellingFAQ', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('counselling_question', models.TextField(max_length=1000)), - ('counselling_answer', models.TextField(max_length=5000)), - ('counselling_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='counselling_cell.counsellingissuecategory')), - ], - ), - ] diff --git a/FusionIIIT/applications/counselling_cell/migrations/__init__.py b/FusionIIIT/applications/counselling_cell/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/department/migrations/0001_initial.py b/FusionIIIT/applications/department/migrations/0001_initial.py deleted file mode 100644 index fc8a34834..000000000 --- a/FusionIIIT/applications/department/migrations/0001_initial.py +++ /dev/null @@ -1,44 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='SpecialRequest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('request_date', models.DateTimeField(default=datetime.date.today)), - ('brief', models.CharField(default='--', max_length=20)), - ('request_details', models.CharField(max_length=200)), - ('upload_request', models.FileField(blank=True, upload_to='')), - ('status', models.CharField(default='Pending', max_length=50)), - ('remarks', models.CharField(default='--', max_length=300)), - ('request_receiver', models.CharField(default='--', max_length=30)), - ('request_maker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Announcements', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('ann_date', models.DateTimeField(default='04-04-2021')), - ('message', models.CharField(max_length=200)), - ('batch', models.CharField(default='Year-1', max_length=40)), - ('department', models.CharField(default='ALL', max_length=40)), - ('programme', models.CharField(max_length=10)), - ('upload_announcement', models.FileField(default=' ', null=True, upload_to='department/upload_announcement')), - ('maker_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - ] diff --git a/FusionIIIT/applications/department/migrations/__init__.py b/FusionIIIT/applications/department/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/eis/migrations/0001_initial.py b/FusionIIIT/applications/eis/migrations/0001_initial.py deleted file mode 100644 index 2fd2e65d3..000000000 --- a/FusionIIIT/applications/eis/migrations/0001_initial.py +++ /dev/null @@ -1,280 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('auth', '0012_alter_user_first_name_max_length'), - ] - - operations = [ - migrations.CreateModel( - name='faculty_about', - fields=[ - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')), - ('about', models.TextField(max_length=1000)), - ('doj', models.DateField(default=datetime.datetime.now)), - ('education', models.TextField(max_length=500)), - ('interest', models.TextField(max_length=500)), - ('contact', models.CharField(blank=True, max_length=10, null=True)), - ('github', models.CharField(blank=True, max_length=100, null=True)), - ('linkedin', models.CharField(blank=True, max_length=100, null=True)), - ], - ), - migrations.CreateModel( - name='emp_visits', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.CharField(max_length=20)), - ('v_type', models.IntegerField(default=1)), - ('country', models.CharField(default=' ', max_length=500)), - ('place', models.CharField(default=' ', max_length=500)), - ('purpose', models.CharField(default=' ', max_length=500)), - ('v_date', models.DateField(blank=True, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('entry_date', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_techtransfer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('details', models.CharField(default=' ', max_length=500)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_session_chair', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('name', models.CharField(default=' ', max_length=500)), - ('event', models.TextField(default=' ', max_length=2500)), - ('s_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('remarks', models.CharField(default=' ', max_length=1000)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_research_projects', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('ptype', models.CharField(default='Research', max_length=100)), - ('pi', models.CharField(default=' ', max_length=1000)), - ('co_pi', models.CharField(default=' ', max_length=1500)), - ('title', models.TextField(default=' ', max_length=5000)), - ('funding_agency', models.CharField(default=' ', max_length=250, null=True)), - ('financial_outlay', models.CharField(default=' ', max_length=150, null=True)), - ('status', models.CharField(choices=[('Awarded', 'Awarded'), ('Submitted', 'Submitted'), ('Ongoing', 'Ongoing'), ('Completed', 'Completed')], max_length=10)), - ('start_date', models.DateField(blank=True, null=True)), - ('finish_date', models.DateField(blank=True, null=True)), - ('date_submission', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_research_papers', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('rtype', models.CharField(choices=[('Journal', 'Journal'), ('Conference', 'Conference')], default='Conference', max_length=500)), - ('authors', models.CharField(blank=True, max_length=2500, null=True)), - ('co_authors', models.CharField(blank=True, max_length=2500, null=True)), - ('title_paper', models.CharField(blank=True, max_length=2500, null=True)), - ('name', models.CharField(blank=True, max_length=2500, null=True)), - ('paper', models.CharField(blank=True, max_length=1000, null=True)), - ('venue', models.CharField(blank=True, max_length=2500, null=True)), - ('volume_no', models.CharField(blank=True, max_length=500, null=True)), - ('page_no', models.CharField(blank=True, max_length=500, null=True)), - ('is_sci', models.CharField(blank=True, choices=[('SCI', 'SCI'), ('SCIE', 'SCIE')], max_length=6, null=True)), - ('isbn_no', models.CharField(blank=True, max_length=250, null=True)), - ('doi', models.CharField(blank=True, max_length=1000, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('date_acceptance', models.DateField(blank=True, null=True)), - ('date_publication', models.DateField(blank=True, null=True)), - ('year', models.CharField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], max_length=10, null=True)), - ('a_month', models.CharField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, max_length=500, null=True)), - ('doc_id', models.CharField(blank=True, max_length=50, null=True)), - ('doc_description', models.CharField(blank=True, max_length=1000, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('status', models.CharField(blank=True, choices=[('Published', 'Published'), ('Accepted', 'Accepted'), ('Communicated', 'Communicated')], max_length=15, null=True)), - ('date_submission', models.DateTimeField(blank=True, null=True)), - ('reference_number', models.CharField(blank=True, max_length=100, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_published_books', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('p_type', models.CharField(choices=[('Book', 'Book'), ('Monograph', 'Monograph'), ('Book Chapter', 'Book Chapter'), ('Handbook', 'Handbook'), ('Technical Report', 'Technical Report')], max_length=16)), - ('title', models.CharField(default=' ', max_length=2500)), - ('publisher', models.CharField(default=' ', max_length=2500)), - ('pyear', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('authors', models.CharField(default=' ', max_length=250)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('publication_date', models.DateField(blank=True, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_patents', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('p_no', models.CharField(max_length=150)), - ('title', models.CharField(max_length=1500)), - ('earnings', models.IntegerField(default=0)), - ('status', models.CharField(choices=[('Filed', 'Filed'), ('Granted', 'Granted'), ('Published', 'Published'), ('Owned', 'Owned')], max_length=15)), - ('p_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_mtechphd_thesis', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('degree_type', models.IntegerField(default=1)), - ('title', models.CharField(max_length=250)), - ('supervisors', models.CharField(max_length=250)), - ('co_supervisors', models.CharField(blank=True, max_length=250, null=True)), - ('rollno', models.CharField(max_length=200)), - ('s_name', models.CharField(max_length=5000)), - ('s_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('semester', models.IntegerField(blank=True, default=1, null=True)), - ('status', models.CharField(blank=True, choices=[('Awarded', 'Awarded'), ('Submitted', 'Submitted'), ('Ongoing', 'Ongoing'), ('Completed', 'Completed')], max_length=10, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_keynote_address', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('type', models.CharField(choices=[('Keynote', 'Keynote'), ('Plenary Address', 'Plenary Address')], default='Keynote', max_length=140)), - ('title', models.CharField(max_length=1000)), - ('name', models.CharField(max_length=1000)), - ('venue', models.CharField(max_length=1000)), - ('page_no', models.CharField(max_length=100)), - ('isbn_no', models.CharField(max_length=200)), - ('k_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_expert_lectures', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('l_type', models.CharField(choices=[('Expert Lecture', 'Expert Lecture'), ('Invited Talk', 'Invited Talk')], default='Expert Lecture', max_length=14)), - ('title', models.CharField(max_length=1000)), - ('place', models.CharField(max_length=1000)), - ('l_date', models.DateField(blank=True, null=True)), - ('l_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_event_organized', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('type', models.CharField(choices=[('Training Program', 'Training Program'), ('Seminar', 'Seminar'), ('Short Term Program', 'Short Term Program'), ('Workshop', 'Workshop'), ('Any Other', 'Any Other')], max_length=180)), - ('name', models.CharField(max_length=1000)), - ('sponsoring_agency', models.CharField(max_length=150)), - ('venue', models.CharField(max_length=100)), - ('role', models.CharField(choices=[('Convener', 'Convener'), ('Coordinator', 'Coordinator'), ('Co-Convener', 'Co-Convener')], max_length=11)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_consultancy_projects', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('consultants', models.CharField(max_length=150)), - ('title', models.CharField(max_length=1000)), - ('client', models.CharField(max_length=1000)), - ('financial_outlay', models.IntegerField()), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('duration', models.CharField(blank=True, max_length=500, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('status', models.CharField(blank=True, choices=[('Completed', 'Completed'), ('Submitted', 'Submitted'), ('Ongoing', 'Ongoing')], default='Ongoing', max_length=10, null=True)), - ('remarks', models.CharField(blank=True, max_length=1000, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_confrence_organised', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('name', models.CharField(max_length=500)), - ('venue', models.CharField(max_length=500)), - ('k_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], default=1, null=True, verbose_name='Month')), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('role1', models.CharField(blank=True, choices=[('Advisary Committee', 'Advisary Committee'), ('Program Committee', 'Program Committee'), ('Organised', 'Organised'), ('Conference Chair', 'Conference Chair'), ('Any Other', 'Any Other')], default='Any Other', max_length=200, null=True)), - ('role2', models.CharField(blank=True, max_length=200, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='emp_achievement', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('a_type', models.CharField(choices=[('Award', 'Award'), ('Honour', 'Honour'), ('Prize', 'Prize'), ('Other', 'Other')], default='Other', max_length=180)), - ('details', models.TextField(default=' ', max_length=1550)), - ('a_day', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20), (21, 21), (22, 22), (23, 23), (24, 24), (25, 25), (26, 26), (27, 27), (28, 28), (29, 29), (30, 30), (31, 31)], null=True, verbose_name='Day')), - ('a_month', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12)], null=True, verbose_name='Month')), - ('a_year', models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023)], null=True, verbose_name='year')), - ('date_entry', models.DateField(default=datetime.datetime.now)), - ('achievment_date', models.DateField(blank=True, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/FusionIIIT/applications/eis/migrations/__init__.py b/FusionIIIT/applications/eis/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/establishment/migrations/0001_initial.py b/FusionIIIT/applications/establishment/migrations/0001_initial.py deleted file mode 100644 index e1449d3b3..000000000 --- a/FusionIIIT/applications/establishment/migrations/0001_initial.py +++ /dev/null @@ -1,284 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('globals', '0001_initial'), - ('auth', '0012_alter_user_first_name_max_length'), - ] - - operations = [ - migrations.CreateModel( - name='Appraisal', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('discipline', models.CharField(max_length=30, null=True)), - ('knowledge_field', models.CharField(max_length=30, null=True)), - ('research_interest', models.CharField(max_length=60, null=True)), - ('status', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected'), ('outstanding', 'Outstanding'), ('excellant', 'Excellent'), ('very good', 'Very Good'), ('good', 'Good'), ('poor', 'Poor')], default='pending', max_length=20)), - ('timestamp', models.DateTimeField(auto_now=True, null=True)), - ('other_research_element', models.CharField(blank=True, default='', max_length=200, null=True)), - ('publications', models.CharField(blank=True, default='', max_length=200, null=True)), - ('conferences_meeting_attended', models.CharField(blank=True, default='', max_length=200, null=True)), - ('conferences_meeting_organized', models.CharField(blank=True, default='', max_length=200, null=True)), - ('admin_assign', models.CharField(blank=True, default='', max_length=200, null=True)), - ('sevice_to_ins', models.CharField(blank=True, default='', max_length=200, null=True)), - ('extra_info', models.CharField(blank=True, default='', max_length=200, null=True)), - ('faculty_comments', models.CharField(blank=True, default='', max_length=200, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_appraisals', to=settings.AUTH_USER_MODEL)), - ('designation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='desig', to='globals.designation')), - ], - ), - migrations.CreateModel( - name='Cpda_application', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', models.CharField(choices=[('requested', 'Requested'), ('approved', 'Approved'), ('rejected', 'Rejected'), ('adjustments_pending', 'Adjustments Pending'), ('finished', 'Finished')], max_length=20, null=True)), - ('pf_number', models.CharField(default='1', max_length=50, null=True)), - ('purpose', models.CharField(blank=True, default='', max_length=500)), - ('requested_advance', models.IntegerField(blank=True)), - ('request_timestamp', models.DateTimeField(auto_now=True, null=True)), - ('adjustment_amount', models.IntegerField(blank=True, default='0', null=True)), - ('bills_attached', models.IntegerField(blank=True, default='-1', null=True)), - ('total_bills_amount', models.IntegerField(blank=True, default='0', null=True)), - ('ppa_register_page_no', models.IntegerField(blank=True, default='-1', null=True)), - ('adjustment_timestamp', models.DateTimeField(auto_now=True, null=True)), - ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'Cpda Application', - }, - ), - migrations.CreateModel( - name='CpdaBalance', - fields=[ - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')), - ('cpda_balance', models.PositiveIntegerField(default=300000)), - ], - ), - migrations.CreateModel( - name='Ltc_application', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', models.CharField(choices=[('requested', 'Requested'), ('approved', 'Approved'), ('rejected', 'Rejected')], max_length=20, null=True)), - ('pf_number', models.CharField(default='', max_length=50)), - ('basic_pay', models.IntegerField(blank=True)), - ('leave_start', models.DateField(null=True)), - ('leave_end', models.DateField()), - ('family_departure_date', models.DateField()), - ('leave_nature', models.CharField(default='', max_length=50)), - ('purpose', models.CharField(blank=True, default='', max_length=500)), - ('is_hometown_or_elsewhere', models.CharField(choices=[('hometown', 'Home Town'), ('elsewhere', 'Elsewhere')], max_length=50)), - ('phone_number', models.CharField(default='', max_length=13)), - ('address_during_leave', models.CharField(blank=True, default='', max_length=500)), - ('travel_mode', models.CharField(choices=[('rail', 'Rail'), ('road', 'Road')], max_length=50)), - ('ltc_availed', models.CharField(blank=True, default='', max_length=100)), - ('ltc_to_avail', models.CharField(blank=True, default='', max_length=200)), - ('dependents', models.CharField(blank=True, default='', max_length=500)), - ('requested_advance', models.IntegerField(blank=True)), - ('request_timestamp', models.DateTimeField(auto_now=True, null=True)), - ('review_timestamp', models.DateTimeField(auto_now=True, null=True)), - ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'Ltc Application', - }, - ), - migrations.CreateModel( - name='Ltc_eligible_user', - fields=[ - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')), - ('date_of_joining', models.DateField(default='2005-04-01')), - ('current_block_size', models.IntegerField(default=4)), - ('total_ltc_allowed', models.IntegerField(default=2)), - ('hometown_ltc_allowed', models.IntegerField(default=2)), - ('elsewhere_ltc_allowed', models.IntegerField(default=1)), - ('hometown_ltc_availed', models.IntegerField(default=0)), - ('elsewhere_ltc_availed', models.IntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='ThesisResearchSupervision', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('stud_name', models.CharField(max_length=30)), - ('thesis_title', models.CharField(blank=True, max_length=30, null=True)), - ('year', models.IntegerField(blank=True, null=True)), - ('semester', models.IntegerField()), - ('status', models.CharField(max_length=30)), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicants_supervised_stud', to='establishment.appraisal')), - ('co_supervisors', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='all_supervisors', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='SponsoredProjects', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('project_title', models.CharField(max_length=30)), - ('sponsoring_agency', models.CharField(max_length=30)), - ('funding', models.IntegerField()), - ('duration', models.IntegerField()), - ('status', models.CharField(max_length=30)), - ('remarks', models.CharField(max_length=30)), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicant_sponsored_projects', to='establishment.appraisal')), - ('co_investigators', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='all_co_investigators', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='NewCoursesOffered', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course_name', models.CharField(max_length=30)), - ('course_num', models.IntegerField(blank=True, null=True)), - ('ug_or_pg', models.CharField(blank=True, max_length=2, null=True)), - ('tutorial_hrs_wk', models.FloatField(blank=True, null=True)), - ('year', models.IntegerField(blank=True, null=True)), - ('semester', models.IntegerField()), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicants_offered_new_courses', to='establishment.appraisal')), - ], - ), - migrations.CreateModel( - name='NewCourseMaterial', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course_name', models.CharField(max_length=30)), - ('course_num', models.IntegerField(blank=True, null=True)), - ('ug_or_pg', models.CharField(blank=True, max_length=2, null=True)), - ('activity_type', models.CharField(blank=True, max_length=10, null=True)), - ('availiability', models.CharField(blank=True, max_length=10, null=True)), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicant_new_courses_material', to='establishment.appraisal')), - ], - ), - migrations.CreateModel( - name='Ltc_to_avail', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=30)), - ('age', models.IntegerField(blank=True, null=True)), - ('ltc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ltcToAvail', to='establishment.ltc_application')), - ], - ), - migrations.CreateModel( - name='Ltc_availed', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=30)), - ('age', models.IntegerField(blank=True, null=True)), - ('ltc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ltcAvailed', to='establishment.ltc_application')), - ], - ), - migrations.CreateModel( - name='Establishment_variables', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('est_admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Dependent', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=30)), - ('age', models.IntegerField(blank=True, null=True)), - ('depend', models.CharField(max_length=30)), - ('ltc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Dependent', to='establishment.ltc_application')), - ], - ), - migrations.CreateModel( - name='Cpda_bill', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('bill', models.FileField(blank=True, upload_to='')), - ('application', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='establishment.cpda_application')), - ], - options={ - 'db_table': 'Cpda Bills', - }, - ), - migrations.CreateModel( - name='CoursesInstructed', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester', models.IntegerField(blank=True, null=True)), - ('course_name', models.CharField(max_length=30)), - ('course_num', models.IntegerField(blank=True, null=True)), - ('lecture_hrs_wk', models.FloatField(blank=True, null=True)), - ('tutorial_hrs_wk', models.FloatField(blank=True, null=True)), - ('lab_hrs_wk', models.FloatField(blank=True, null=True)), - ('reg_students', models.IntegerField(blank=True, null=True)), - ('co_instructor', models.CharField(blank=True, max_length=250, null=True)), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicant_courses', to='establishment.appraisal')), - ], - ), - migrations.CreateModel( - name='AppraisalRequest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('remark_hod', models.CharField(blank=True, max_length=50, null=True)), - ('remark_director', models.CharField(blank=True, max_length=50, null=True)), - ('status_hod', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected'), ('outstanding', 'Outstanding'), ('excellant', 'Excellent'), ('very good', 'Very Good'), ('good', 'Good'), ('poor', 'Poor')], default='pending', max_length=20)), - ('status_director', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected'), ('outstanding', 'Outstanding'), ('excellant', 'Excellent'), ('very good', 'Very Good'), ('good', 'Good'), ('poor', 'Poor')], default='pending', max_length=20)), - ('permission', models.CharField(blank=True, choices=[('intermediary', 'Intermediary Staff'), ('sanc_auth', 'Appraisal Sanctioning Authority'), ('sanc_off', 'Appraisal Sanctioning Officer')], default='sanc_auth', max_length=20, null=True)), - ('request_timestamp', models.DateTimeField(auto_now=True, null=True)), - ('appraisal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='appraisal_tracking', to='establishment.appraisal')), - ('director', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='director', to=settings.AUTH_USER_MODEL)), - ('hod', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hod', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='AppraisalAdministrators', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('authority', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sanc_authority_of_ap', to='globals.designation')), - ('officer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sanc_officer_of_ap', to='globals.designation')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='apprasial_admins', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Ltc_tracking', - fields=[ - ('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='tracking_info', serialize=False, to='establishment.ltc_application')), - ('designations', models.CharField(blank=True, max_length=350, null=True)), - ('remarks', models.CharField(blank=True, max_length=350, null=True)), - ('review_status', models.CharField(choices=[('to_assign', 'To Assign'), ('under_review', 'Under Review'), ('reviewed', 'Reviewed')], max_length=20, null=True)), - ('admin_remarks', models.CharField(blank=True, max_length=200, null=True)), - ('reviewer_design', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='globals.designation')), - ('reviewer_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'Ltc Tracking', - }, - ), - migrations.CreateModel( - name='Cpda_tracking', - fields=[ - ('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='tracking_info', serialize=False, to='establishment.cpda_application')), - ('current_reviewer_id', models.IntegerField(blank=True, default=1)), - ('remarks', models.CharField(blank=True, max_length=250, null=True)), - ('remarks_rev1', models.CharField(blank=True, max_length=250, null=True)), - ('remarks_rev2', models.CharField(blank=True, max_length=250, null=True)), - ('remarks_rev3', models.CharField(blank=True, max_length=250, null=True)), - ('review_status', models.CharField(choices=[('to_assign', 'To Assign'), ('under_review', 'Under Review'), ('reviewed', 'Reviewed')], max_length=20, null=True)), - ('bill', models.FileField(blank=True, null=True, upload_to='')), - ('reviewer_design', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='desig1', to='globals.designation')), - ('reviewer_design2', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='desig2', to='globals.designation')), - ('reviewer_design3', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='desig3', to='globals.designation')), - ('reviewer_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reviewer1', to=settings.AUTH_USER_MODEL)), - ('reviewer_id2', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reviewer2', to=settings.AUTH_USER_MODEL)), - ('reviewer_id3', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reviewer3', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'Cpda Tracking', - }, - ), - ] diff --git a/FusionIIIT/applications/establishment/migrations/__init__.py b/FusionIIIT/applications/establishment/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/estate_module/migrations/0001_initial.py b/FusionIIIT/applications/estate_module/migrations/0001_initial.py deleted file mode 100644 index 478a93b83..000000000 --- a/FusionIIIT/applications/estate_module/migrations/0001_initial.py +++ /dev/null @@ -1,126 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Building', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('dateIssued', models.DateField()), - ('dateConstructionStarted', models.DateField(blank=True, null=True)), - ('dateConstructionCompleted', models.DateField(blank=True, null=True)), - ('dateOperational', models.DateField(blank=True, null=True)), - ('status', models.CharField(choices=[('OS', 'On Schedule'), ('DL', 'Delayed')], default='OS', max_length=2)), - ('area', models.IntegerField(blank=True, null=True)), - ('constructionCostEstimated', models.IntegerField(blank=True, null=True)), - ('constructionCostActual', models.IntegerField(blank=True, null=True)), - ('numRooms', models.IntegerField(blank=True, null=True)), - ('numWashrooms', models.IntegerField(blank=True, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ('verified', models.BooleanField(default=False)), - ], - options={ - 'ordering': ['-id'], - }, - ), - migrations.CreateModel( - name='InventoryType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('rate', models.IntegerField()), - ('manufacturer', models.CharField(blank=True, max_length=100, null=True)), - ('model', models.CharField(blank=True, max_length=100, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ], - ), - migrations.CreateModel( - name='Work', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('workType', models.CharField(choices=[('CW', 'Construction'), ('MW', 'Maintenance')], default='MW', max_length=2)), - ('contractorName', models.CharField(max_length=100)), - ('status', models.CharField(choices=[('OS', 'On Schedule'), ('DL', 'Delayed')], default='OS', max_length=2)), - ('dateIssued', models.DateField()), - ('dateStarted', models.DateField(blank=True, null=True)), - ('dateCompleted', models.DateField(blank=True, null=True)), - ('costEstimated', models.IntegerField(blank=True, null=True)), - ('costActual', models.IntegerField(blank=True, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ('verified', models.BooleanField(default=False)), - ('building', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='estate_module.building')), - ], - options={ - 'ordering': ['-id'], - }, - ), - migrations.CreateModel( - name='SubWork', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('dateIssued', models.DateField()), - ('dateStarted', models.DateField(blank=True, null=True)), - ('dateCompleted', models.DateField(blank=True, null=True)), - ('costEstimated', models.IntegerField(blank=True, null=True)), - ('costActual', models.IntegerField(blank=True, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ('work', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='estate_module.work')), - ], - options={ - 'ordering': ['-id'], - }, - ), - migrations.CreateModel( - name='InventoryNonConsumable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity', models.IntegerField()), - ('dateOrdered', models.DateField()), - ('dateReceived', models.DateField(blank=True, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ('serial_no', models.CharField(max_length=20)), - ('dateLastVerified', models.DateField()), - ('building', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='estate_module.building')), - ('inventoryType', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='estate_module.inventorytype')), - ('issued_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), - ('work', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='estate_module.work')), - ], - options={ - 'ordering': ['-id'], - 'abstract': False, - }, - ), - migrations.CreateModel( - name='InventoryConsumable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity', models.IntegerField()), - ('dateOrdered', models.DateField()), - ('dateReceived', models.DateField(blank=True, null=True)), - ('remarks', models.TextField(blank=True, null=True)), - ('presentQuantity', models.IntegerField()), - ('building', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='estate_module.building')), - ('inventoryType', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='estate_module.inventorytype')), - ('work', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='estate_module.work')), - ], - options={ - 'ordering': ['-id'], - 'abstract': False, - }, - ), - ] diff --git a/FusionIIIT/applications/estate_module/migrations/__init__.py b/FusionIIIT/applications/estate_module/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/feeds/migrations/0001_initial.py b/FusionIIIT/applications/feeds/migrations/0001_initial.py deleted file mode 100644 index 30ae94c92..000000000 --- a/FusionIIIT/applications/feeds/migrations/0001_initial.py +++ /dev/null @@ -1,148 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='AllTags', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tag', models.CharField(choices=[('CSE', 'CSE'), ('ECE', 'ECE'), ('Mechanical', 'Mechanical'), ('Technical-Clubs', 'Technical Clubs'), ('Cultural-Clubs', 'Cultural Clubs'), ('Sports-Clubs', 'Sports Clubs'), ('Business-and-Career', 'Business and Career'), ('Entertainment', 'Entertainment'), ('IIITDMJ-Campus', 'IIITDMJ Campus'), ('Jabalpur-city', 'Jabalpur city'), ('IIITDMJ-Rules-and-Regulations', 'IIITDMJ rules and regulations'), ('Academics', 'Academics'), ('IIITDMJ', 'IIITDMJ'), ('Life-Relationship-and-Self', 'Life Relationship and Self'), ('Technology-and-Education', 'Technology and Education'), ('Programmes', 'Programmes'), ('Others', 'Others'), ('Design', 'Design')], default='CSE', max_length=100)), - ('subtag', models.CharField(choices=[('Web-Development', 'Web Development'), ('Competitive-Programming', 'Competitive Programming'), ('Programming-Languages', 'Programming-Languages'), ('Data-Science', 'Data-Science'), ('Ethical-Hacking-and-Cyber-Security', 'Ethical hacking and cyber security'), ('Cryptography-and-Network-Security', 'cryptography and network security'), ('Software-Engineering', 'Software-Engineering'), ('Algorithm', 'Algorithm'), ('Mobile-Development', 'Mobile-Development'), ('Game-Development', 'Game-Development'), ('Artificial-Intelligence', 'Artificial Intelligence'), ('Electronics-Circuit-Design', 'Electronics Circuit Design'), ('Wireless-Communication', 'Wireless Communication'), ('Embedded-System', 'Embedded Systems'), ('VLSI', 'VLSI'), ('Control-System', 'Control Systems'), ('Robotics-and-others', 'Robotics and Others'), ('Microcontrollers', 'Microcontrollers'), ('IOT', 'IOT'), ('Robotics', 'Robotics'), ('Thermodynamics', 'Thermodynamics'), ('Nanatechnology', 'Nanatechnology'), ('Manufacturing', 'Manufacturing'), ('Programming-and-Webix-Club', 'Programming and Webix Club'), ('Electronics-Club', 'Electronics Club'), ('Business-and-Management-Club', 'Business and Management Club'), ('Robotics-Club', 'Robotics Club'), ('CAD-Club', 'CAD Club'), ('Astronomy-and-Physics-Society', 'ASTRONOMY AND PHYSICS SOCIETY'), ('Aakriti-The-Film-Making-and-Photography-Club', 'AAKRITI-THE FILM MAKING AND PHOTOGRAPHY CLUB'), ('AUTOMOTIVE-AND-FABRICATION-CLUB', 'AUTOMOTIVE AND FABRICATION CLUB'), ('RACING-CLUB', 'RACING CLUB'), ('SAAZ-MUSIC-CLUB', 'SAAZ-MUSIC CLUB'), ('SAMVAAD-THE-LITERATURE-AND-QUIZZING-SOCIETY', 'SAMVAAD-THE LITERATURE AND QUIZZING SOCIETY'), ('ABHIVYAKTI-ARTS-CLUB', 'ABHIVYAKTI-ARTS CLUB'), ('JAZBAAT-THE-DRAMATICS-SOCIETY', 'JAZBAAT-THE DRAMATICS SOCIETY'), ('AAVARTAN-DANCE-CLUB', 'AAVARTAN-DANCE CLUB'), ('BADMINTON-CLUB', 'BADMINTON CLUB'), ('LAWN-TENNIS-&-BASKETBALL-CLUB', 'LAWN TENNIS&BASKETBALL CLUB'), ('TABLE-TENNIS', 'TABLE TENNIS'), ('CHESS-&-CARROM-CLUB', 'CHESS & CARROM CLUB'), ('CRICKET-CLUB', 'CRICKET CLUB'), ('FOOTBALL-CLUB', 'FOOTBALL CLUB'), ('VOLLEYBALL-CLUB', 'VOLLEYBALL CLUB'), ('ATHLETICS-CLUB', 'ATHLETICS CLUB'), ('Business-Models-and-Strategies', 'Business Models and strategies'), ('Startups-and-Stratup-Strategies', 'Startups and Stratup Strategies'), ('Entrepreneurship', 'Entrepreneurship'), ('Finance', 'Finance'), ('Marketing', 'Marketing'), ('Stock-Market', 'Stock market'), ('Career-Advice', 'Career Advice'), ('Job-Interviews', 'Job Interviews'), ('Journalism', 'Journalism'), ('Entertainment', 'Entertainment'), ('Hollywood-and-Movies', 'Hollywood and Movies'), ('Music', 'Music'), ('Fashion-and-Style', 'Fashion and Style'), ('IIITDMJ-Campus', 'IIITDMJ-Campus'), ('Jabalpur-City', 'Jabalpur City'), ('IIITDMJ-rules-and-Regulations', 'IIITDMJ rules and regulations'), ('Academic-Office-Stuffs', 'Academic office stuffs'), ('Academic-Courses', 'Academic courses'), ('Central-Mess', 'Central Mess'), ('Alumni', 'Alumni'), ('Hostels', 'Hostels'), ('PHC', 'PHC'), ('Activities', 'Activities'), ('Counselling', 'Counselling'), ('Achievments', 'Achievments'), ('Library', 'Library'), ('Faculty', 'Faculty'), ('Staff', 'Staff'), ('College-Fest', 'College Fest'), ('Workshops', 'Workshops'), ('Campus-Recruitments', 'Campus Recruitments'), ('Jagrati', 'Jagrati'), ('Self-Improvement', 'Self Improvement'), ('Friendship', 'Friendship'), ('Experiences', 'Experiences'), ('Dating-and-Relationships', 'Dating and Relationships'), ('Interpersonal-Interactions', 'Interpersonal Interactions'), ('Life-and-Social-Advice', 'Life and Social Advice'), ('Philosophy', 'Philosophy'), ('Technology-Trends', 'Technology Trends'), ('TED', 'TED'), ('Higher-Education', 'Higher Education'), ('Science-and-Universe', 'Science and Universe'), ('Social-Media', 'Social-Media'), ('Toron', 'Toron'), ('Jobs-and-Internships', 'Jobs and Internships'), ('Btech', 'Btech'), ('Mtech', 'Mtech'), ('Bdes', 'Bdes'), ('Mdes', 'Mdes'), ('Phd', 'Phd'), ('Mechatronics', 'Mechatronics'), ('others', 'others')], default='Web-Development', max_length=100, unique=True)), - ], - ), - migrations.CreateModel( - name='AskaQuestion', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('can_delete', models.BooleanField(default=False)), - ('can_update', models.BooleanField(default=False)), - ('subject', models.CharField(max_length=100)), - ('description', models.CharField(blank=True, default='', max_length=500, null=True)), - ('file', models.FileField(blank=True, null=True, upload_to='feeds/files')), - ('uploaded_at', models.DateTimeField(default=django.utils.timezone.now)), - ('is_liked', models.BooleanField(default=False)), - ('is_requested', models.BooleanField(default=False)), - ('request', models.IntegerField(default=0)), - ('anonymous_ask', models.BooleanField(default=False)), - ('dislikes', models.ManyToManyField(blank=True, default=1, related_name='dislikes', to=settings.AUTH_USER_MODEL)), - ('likes', models.ManyToManyField(blank=True, default=1, related_name='likes', to=settings.AUTH_USER_MODEL)), - ('requests', models.ManyToManyField(blank=True, default=1, related_name='requests', to=settings.AUTH_USER_MODEL)), - ('select_tag', models.ManyToManyField(to='feeds.AllTags')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Comments', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('comment_text', models.CharField(max_length=5000)), - ('commented_at', models.DateTimeField(default=django.utils.timezone.now)), - ('is_liked', models.BooleanField(default=False)), - ('likes_comment', models.ManyToManyField(blank=True, default=1, related_name='likes_comment', to=settings.AUTH_USER_MODEL)), - ('question', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.askaquestion')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Roles', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('role', models.CharField(max_length=100)), - ('active', models.BooleanField(default=True)), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='report', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('report_msg', models.CharField(default='', max_length=1000)), - ('question', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.askaquestion')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Reply', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('msg', models.CharField(max_length=1000)), - ('content', models.CharField(default='', max_length=5000)), - ('replied_at', models.DateTimeField(default=django.utils.timezone.now)), - ('comment', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.comments')), - ('replies', models.ManyToManyField(blank=True, default=1, related_name='replies', to=settings.AUTH_USER_MODEL)), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='QuestionAccessControl', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('canVote', models.BooleanField()), - ('canAnswer', models.BooleanField()), - ('canComment', models.BooleanField()), - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('posted_by', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.roles')), - ('question', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='question_list', to='feeds.askaquestion')), - ], - ), - migrations.CreateModel( - name='Profile', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('bio', models.CharField(blank=True, max_length=250)), - ('profile_picture', models.ImageField(blank=True, null=True, upload_to='feeds/profile_pictures')), - ('profile_view', models.IntegerField(default=0)), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='AnsweraQuestion', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('content', models.TextField(max_length=1000)), - ('uploaded_at', models.DateTimeField(default=django.utils.timezone.now)), - ('is_liked', models.BooleanField(default=False)), - ('answers', models.ManyToManyField(blank=True, default=1, related_name='answers', to=settings.AUTH_USER_MODEL)), - ('dislikes', models.ManyToManyField(blank=True, default=1, related_name='answer_dislikes', to=settings.AUTH_USER_MODEL)), - ('likes', models.ManyToManyField(blank=True, default=1, related_name='answer_likes', to=settings.AUTH_USER_MODEL)), - ('question', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.askaquestion')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='tags', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('my_tag', models.CharField(choices=[('CSE', 'CSE'), ('ECE', 'ECE'), ('Mechanical', 'Mechanical'), ('Technical-Clubs', 'Technical Clubs'), ('Cultural-Clubs', 'Cultural Clubs'), ('Sports-Clubs', 'Sports Clubs'), ('Business-and-Career', 'Business and Career'), ('Entertainment', 'Entertainment'), ('IIITDMJ-Campus', 'IIITDMJ Campus'), ('Jabalpur-city', 'Jabalpur city'), ('IIITDMJ-Rules-and-Regulations', 'IIITDMJ rules and regulations'), ('Academics', 'Academics'), ('IIITDMJ', 'IIITDMJ'), ('Life-Relationship-and-Self', 'Life Relationship and Self'), ('Technology-and-Education', 'Technology and Education'), ('Programmes', 'Programmes'), ('Others', 'Others'), ('Design', 'Design')], default=1, max_length=100)), - ('my_subtag', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.alltags')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'unique_together': {('user', 'my_subtag')}, - }, - ), - migrations.CreateModel( - name='hidden', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('question', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='feeds.askaquestion')), - ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - options={ - 'unique_together': {('user', 'question')}, - }, - ), - ] diff --git a/FusionIIIT/applications/feeds/migrations/__init__.py b/FusionIIIT/applications/feeds/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/filetracking/migrations/0001_initial.py b/FusionIIIT/applications/filetracking/migrations/0001_initial.py deleted file mode 100644 index 6924ae1ff..000000000 --- a/FusionIIIT/applications/filetracking/migrations/0001_initial.py +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='File', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('subject', models.CharField(blank=True, max_length=100, null=True)), - ('description', models.CharField(blank=True, max_length=400, null=True)), - ('upload_date', models.DateTimeField(auto_now_add=True)), - ('upload_file', models.FileField(blank=True, upload_to='')), - ('is_read', models.BooleanField(default=False)), - ('designation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='upload_designation', to='globals.designation')), - ('uploader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='uploaded_files', to='globals.extrainfo')), - ], - options={ - 'db_table': 'File', - }, - ), - migrations.CreateModel( - name='Tracking', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('receive_date', models.DateTimeField(auto_now_add=True)), - ('forward_date', models.DateTimeField(auto_now_add=True)), - ('remarks', models.CharField(blank=True, max_length=250, null=True)), - ('upload_file', models.FileField(blank=True, upload_to='')), - ('is_read', models.BooleanField(default=False)), - ('current_design', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='globals.holdsdesignation')), - ('current_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ('file_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='filetracking.file')), - ('receive_design', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rec_design', to='globals.designation')), - ('receiver_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='receiver_id', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'db_table': 'Tracking', - }, - ), - ] diff --git a/FusionIIIT/applications/filetracking/migrations/__init__.py b/FusionIIIT/applications/filetracking/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/finance_accounts/migrations/0001_initial.py b/FusionIIIT/applications/finance_accounts/migrations/0001_initial.py deleted file mode 100644 index 4dfa8fed7..000000000 --- a/FusionIIIT/applications/finance_accounts/migrations/0001_initial.py +++ /dev/null @@ -1,100 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Bank', - fields=[ - ('bank_id', models.AutoField(primary_key=True, serialize=False)), - ('Account_no', models.IntegerField(default=0, unique=True)), - ('Bank_Name', models.CharField(max_length=50)), - ('IFSC_Code', models.CharField(max_length=20, unique=True)), - ('Branch_Name', models.CharField(max_length=80)), - ], - ), - migrations.CreateModel( - name='Company', - fields=[ - ('company_id', models.AutoField(primary_key=True, serialize=False)), - ('Company_Name', models.CharField(max_length=20, unique=True)), - ('Start_Date', models.DateField()), - ('End_Date', models.DateField(blank=True, null=True)), - ('Description', models.CharField(max_length=200)), - ('Status', models.CharField(max_length=200)), - ], - ), - migrations.CreateModel( - name='Payments', - fields=[ - ('payment_id', models.AutoField(primary_key=True, serialize=False)), - ('TransactionId', models.IntegerField(default=0, unique=True)), - ('ToWhom', models.CharField(max_length=80)), - ('FromWhom', models.CharField(max_length=80)), - ('Purpose', models.CharField(max_length=20)), - ('Date', models.DateField()), - ], - ), - migrations.CreateModel( - name='Paymentscheme', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('month', models.CharField(max_length=70, null=True)), - ('year', models.IntegerField(null=True)), - ('pf', models.IntegerField(null=True)), - ('name', models.CharField(max_length=70)), - ('designation', models.CharField(max_length=50)), - ('pay', models.IntegerField()), - ('gr_pay', models.IntegerField()), - ('da', models.IntegerField()), - ('ta', models.IntegerField()), - ('hra', models.IntegerField()), - ('fpa', models.IntegerField()), - ('special_allow', models.IntegerField()), - ('nps', models.IntegerField()), - ('gpf', models.IntegerField()), - ('income_tax', models.IntegerField()), - ('p_tax', models.IntegerField()), - ('gslis', models.IntegerField()), - ('gis', models.IntegerField()), - ('license_fee', models.IntegerField()), - ('electricity_charges', models.IntegerField()), - ('others', models.IntegerField()), - ('gr_reduction', models.IntegerField(default=0)), - ('net_payment', models.IntegerField(default=0)), - ('senior_verify', models.BooleanField(default=False)), - ('ass_registrar_verify', models.BooleanField(default=False)), - ('ass_registrar_aud_verify', models.BooleanField(default=False)), - ('registrar_director_verify', models.BooleanField(default=False)), - ('runpayroll', models.BooleanField(default=False)), - ('view', models.BooleanField(default=True)), - ], - ), - migrations.CreateModel( - name='Receipts', - fields=[ - ('receipt_id', models.AutoField(primary_key=True, serialize=False)), - ('TransactionId', models.IntegerField(default=0, unique=True)), - ('ToWhom', models.CharField(max_length=80)), - ('FromWhom', models.CharField(max_length=80)), - ('Purpose', models.CharField(max_length=20)), - ('Date', models.DateField()), - ], - ), - migrations.AddConstraint( - model_name='paymentscheme', - constraint=models.UniqueConstraint(fields=('month', 'year', 'pf'), name='Unique Contraint 1'), - ), - migrations.AddConstraint( - model_name='bank', - constraint=models.UniqueConstraint(fields=('Bank_Name', 'Branch_Name'), name='Unique Contraint 2'), - ), - ] diff --git a/FusionIIIT/applications/finance_accounts/migrations/__init__.py b/FusionIIIT/applications/finance_accounts/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/globals/migrations/0001_initial.py b/FusionIIIT/applications/globals/migrations/0001_initial.py deleted file mode 100644 index 1fc3a8925..000000000 --- a/FusionIIIT/applications/globals/migrations/0001_initial.py +++ /dev/null @@ -1,112 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import applications.globals.models -import datetime -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='DepartmentInfo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100, unique=True)), - ], - ), - migrations.CreateModel( - name='Designation', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(default='student', max_length=50, unique=True)), - ('full_name', models.CharField(default='Computer Science and Engineering', max_length=100)), - ('type', models.CharField(choices=[('academic', 'Academic Designation'), ('administrative', 'Administrative Designation')], default='academic', max_length=30)), - ], - ), - migrations.CreateModel( - name='ExtraInfo', - fields=[ - ('id', models.CharField(max_length=20, primary_key=True, serialize=False)), - ('title', models.CharField(choices=[('Mr.', 'Mr.'), ('Mrs.', 'Mrs.'), ('Ms.', 'Ms.'), ('Dr.', 'Dr.'), ('Professor', 'Prof.'), ('Shreemati', 'Shreemati'), ('Shree', 'Shree')], default='Dr.', max_length=20)), - ('sex', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], default='M', max_length=2)), - ('date_of_birth', models.DateField(default=datetime.date(1970, 1, 1))), - ('user_status', models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50)), - ('address', models.TextField(default='', max_length=1000)), - ('phone_no', models.BigIntegerField(default=9999999999, null=True)), - ('user_type', models.CharField(choices=[('student', 'student'), ('staff', 'staff'), ('compounder', 'compounder'), ('faculty', 'faculty')], max_length=20)), - ('profile_picture', models.ImageField(blank=True, null=True, upload_to='globals/profile_pictures')), - ('about_me', models.TextField(blank=True, default='NA', max_length=1000)), - ('date_modified', models.DateTimeField(blank=True, null=True, verbose_name='date_updated')), - ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='globals.departmentinfo')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Faculty', - fields=[ - ('id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Staff', - fields=[ - ('id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='IssueImage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('image', models.ImageField(upload_to=applications.globals.models.Issue_image_directory)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Issue', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('report_type', models.CharField(choices=[('feature_request', 'Feature Request'), ('bug_report', 'Bug Report'), ('security_issue', 'Security Issue'), ('ui_issue', 'User Interface Issue'), ('other', 'Other than the ones listed')], max_length=63)), - ('module', models.CharField(choices=[('academic_information', 'Academic'), ('central_mess', 'Central Mess'), ('complaint_system', 'Complaint System'), ('eis', 'Employee Imformation System'), ('file_tracking', 'File Tracking System'), ('health_center', 'Health Center'), ('leave', 'Leave'), ('online_cms', 'Online Course Management System'), ('placement_cell', 'Placement Cell'), ('scholarships', 'Scholarships'), ('visitor_hostel', 'Visitor Hostel'), ('other', 'Other')], max_length=63)), - ('closed', models.BooleanField(default=False)), - ('text', models.TextField()), - ('title', models.CharField(max_length=255)), - ('timestamp', models.DateTimeField(auto_now=True)), - ('added_on', models.DateTimeField(auto_now_add=True)), - ('images', models.ManyToManyField(blank=True, to='globals.IssueImage')), - ('support', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reported_issues', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Feedback', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('rating', models.IntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)])), - ('feedback', models.TextField(blank=True)), - ('timestamp', models.DateTimeField(auto_now=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='fusion_feedback', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='HoldsDesignation', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('held_at', models.DateTimeField(auto_now=True)), - ('designation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='designees', to='globals.designation')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='holds_designations', to=settings.AUTH_USER_MODEL)), - ('working', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='current_designation', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'unique_together': {('user', 'designation'), ('working', 'designation')}, - }, - ), - ] diff --git a/FusionIIIT/applications/globals/migrations/0002_auto_20240302_1616.py b/FusionIIIT/applications/globals/migrations/0002_auto_20240302_1616.py new file mode 100644 index 000000000..814fa9ac7 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0002_auto_20240302_1616.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-03-02 16:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0003_auto_20240302_1621.py b/FusionIIIT/applications/globals/migrations/0003_auto_20240302_1621.py new file mode 100644 index 000000000..cdcaa9cf1 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0003_auto_20240302_1621.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-03-02 16:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0002_auto_20240302_1616'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/__init__.py b/FusionIIIT/applications/globals/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/globals/urls.py b/FusionIIIT/applications/globals/urls.py index f8d82ee71..2dea4e77d 100644 --- a/FusionIIIT/applications/globals/urls.py +++ b/FusionIIIT/applications/globals/urls.py @@ -23,5 +23,6 @@ # Endpoint to reset all passwords in DEV environment url(r'^resetallpass/$', views.reset_all_pass, name='resetallpass'), # API urls - url(r'^api/', include('applications.globals.api.urls')) + url(r'^api/', include('applications.globals.api.urls')), + url(r'^update_global_variable/$', views.update_global_variable, name='update_global_var'), ] diff --git a/FusionIIIT/applications/globals/views.py b/FusionIIIT/applications/globals/views.py index a7f3886c9..5b023abb5 100644 --- a/FusionIIIT/applications/globals/views.py +++ b/FusionIIIT/applications/globals/views.py @@ -740,21 +740,26 @@ def dashboard(request): } # a=HoldsDesignation.objects.select_related('user','working','designation').filter(designation = user) + print(context) + print(type(user.extrainfo.user_type)) if(request.user.get_username() == 'director'): return render(request, "dashboard/director_dashboard2.html", {}) elif( "dean_rspc" in designation): return render(request, "dashboard/dashboard.html", context) - elif user.extrainfo.user_type != 'student': + elif user.extrainfo.user_type != "student": + print ("inside") designat = HoldsDesignation.objects.select_related().filter(user=user) response = {'designat':designat} context.update(response) return render(request, "dashboard/dashboard.html", context) else: + print ("inside2") + return render(request, "dashboard/dashboard.html", context) @login_required(login_url=LOGIN_URL) -def profile(request, username=None): +def profile(request, username=None): """ Generic endpoint for views. If it's a faculty, redirects to /eis/profile/* @@ -768,16 +773,76 @@ def profile(request, username=None): """ user = get_object_or_404(User, Q(username=username)) if username else request.user - editable = request.user == user + print("editable",editable) profile = get_object_or_404(ExtraInfo, Q(user=user)) + print("profile",profile) if(str(user.extrainfo.user_type)=='faculty'): + print("profile") return HttpResponseRedirect('/eis/profile/' + (username if username else '')) if(str(user.extrainfo.department)=='department: Academics'): + print("profile2") return HttpResponseRedirect('/aims') - current = HoldsDesignation.objects.select_related('user','working','designation').filter(Q(working=user, designation__name="student")) + + array = [ + "student", + "CC convenor", + "Mechatronic convenor", + "mess_committee", + "mess_convener", + "alumini", + "Electrical_AE", + "Electrical_JE", + "Civil_AE", + "Civil_JE", + "co-ordinator", + "co co-ordinator", + "Convenor", + "Convener", + "cc1convener", + "CC2 convener", + "mess_convener_mess2", + "mess_committee_mess2" +] + + # queryset = HoldsDesignation.objects.select_related('user','working','designation').filter(Q(working=user)) + + # for obj in queryset: + # designation_name = obj.designation.name + # print("designation_name",designation_name) + + # design = False + # if designation_name in array: + # design = True + # print("design",design) + # print("designation_name",designation_name) + # if design: + # current = HoldsDesignation.objects.select_relapted('user','working','designation').filter(Q(working=user, designation__name=designation_name)) + # for obj in current: + # obj.designation.name = obj.designation.name.replace(designation_name, 'student') + + designation_name = "" + design = False + + current = HoldsDesignation.objects.select_related('user', 'working', 'designation').filter(Q(working=user)) + + for obj in current: + designation_name = obj.designation.name + if designation_name in array: + design = True + break + + if design: + current = HoldsDesignation.objects.filter(working=user, designation__name=designation_name) + for obj in current: + obj.designation.name = obj.designation.name.replace(designation_name, 'student') + + print(user.extrainfo.user_type) + print("current",current) if current: + print("profile3") student = get_object_or_404(Student, Q(id=profile.id)) + print("student",student) if editable and request.method == 'POST': if 'studentapprovesubmit' in request.POST: status = PlacementStatus.objects.select_related('notify_id','unique_id__id__user','unique_id__id__department').filter(pk=request.POST['studentapprovesubmit']).update(invitation='ACCEPTED', timestamp=timezone.now()) @@ -979,6 +1044,7 @@ def profile(request, username=None): return render(request, "globals/student_profile4.html", context) if 'achievementsubmit' in request.POST or 'deleteach' in request.POST: return render(request, "globals/student_profile5.html", context) + print("context",context) return render(request, "globals/student_profile.html", context) else: return redirect("/") @@ -1176,4 +1242,15 @@ def search(request): if len(search_results) == 0: search_results = [] context = {'sresults':search_results} - return render(request, "globals/search.html", context) + return render(request, "globals/search.html", context), + +@login_required(login_url=LOGIN_URL) +def update_global_variable(request): + if request.method == 'POST': + selected_option = request.POST.get('dropdown') + request.session['currentDesignationSelected'] = selected_option + print(selected_option) + print(request.session['currentDesignationSelected']) + return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/')) + # Redirect to home if not a POST request or some issue occurs + return HttpResponseRedirect(reverse('home')) diff --git a/FusionIIIT/applications/gymkhana/api/serializers.py b/FusionIIIT/applications/gymkhana/api/serializers.py index 6d440a77f..f03cbdd13 100644 --- a/FusionIIIT/applications/gymkhana/api/serializers.py +++ b/FusionIIIT/applications/gymkhana/api/serializers.py @@ -2,9 +2,14 @@ from django.contrib.auth import get_user_model from rest_framework.authtoken.models import Token from rest_framework import serializers -from applications.gymkhana.models import Club_info,Session_info,Event_info +from applications.gymkhana.models import Club_info,Session_info,Event_info, Voting_choices from applications.gymkhana.models import Club_member,Core_team,Club_budget,Club_report,Fest_budget,Registration_form,Voting_polls +class Voting_choicesSerializer(serializers.ModelSerializer): + class Meta: + model = Voting_choices + fields = ['poll_event', 'title', 'description', 'votes'] + class Club_infoSerializer(serializers.ModelSerializer): class Meta: @@ -25,7 +30,7 @@ class Core_teamSerializer(serializers.ModelSerializer): class Meta: model=Core_team - fields=('_all_') + fields=('all') class Club_DetailsSerializer(serializers.ModelSerializer): class Meta: @@ -35,13 +40,18 @@ class Meta: class Session_infoSerializer(serializers.ModelSerializer): class Meta: model = Session_info - fields= ['venue','date','start_time','details'] + fields = [ 'venue', 'date', 'start_time', 'end_time', 'details','status'] + +class Club_memberSerializer(serializers.ModelSerializer): + class Meta: + model = Club_member + fields = ['member','club','description', 'status','remarks'] class event_infoserializer(serializers.ModelSerializer): class Meta: model=Event_info - fields=['club','event_name','incharge','date'] + fields=['club','event_name','incharge','date','venue','start_time','end_time','details'] class club_budgetserializer(serializers.ModelSerializer): diff --git a/FusionIIIT/applications/gymkhana/api/views.py b/FusionIIIT/applications/gymkhana/api/views.py index 75194c10c..19ea0d093 100644 --- a/FusionIIIT/applications/gymkhana/api/views.py +++ b/FusionIIIT/applications/gymkhana/api/views.py @@ -1,3 +1,5 @@ +import json +from venv import logger from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import TokenAuthentication from rest_framework import status @@ -5,13 +7,92 @@ from rest_framework.decorators import api_view, permission_classes,authentication_classes from rest_framework.permissions import AllowAny from rest_framework.response import Response -from ..models import ExtraInfo, Student, Faculty -from django.shortcuts import get_object_or_404, redirect, render -import json -from applications.gymkhana.models import Club_info,Club_member,Core_team,Session_info,Event_info,Club_budget,Club_report,Fest_budget,Registration_form,Voting_polls -from .serializers import Club_memberSerializer,Core_teamSerializer,Club_infoSerializer,Club_DetailsSerializer,Session_infoSerializer,event_infoserializer,club_budgetserializer,Club_reportSerializers,Fest_budgerSerializer,Registration_formSerializer,Voting_pollSerializer, NewClubSerializer +from django.shortcuts import render +from applications.gymkhana.models import Voting_choices, Registration_form, Student ,Club_info,Club_member,Core_team,Session_info,Event_info,Club_budget,Club_report,Fest_budget,Registration_form,Voting_polls +from .serializers import Club_memberSerializer,Core_teamSerializer,Club_infoSerializer,Club_DetailsSerializer,Session_infoSerializer, Voting_choicesSerializer,event_infoserializer,club_budgetserializer,Club_reportSerializers,Fest_budgerSerializer,Registration_formSerializer,Voting_pollSerializer from django.contrib.auth.models import User +from applications.gymkhana.views import * + +class ActCalendarAPIView(APIView): + """ + API endpoint to upload the activity calendar of a club. + """ + + def post(self, request): + """ + Handles POST requests to upload the activity calendar. + """ + try: + # Getting form data + club = request.data.get("club") + act_calender = request.FILES.get("act_file") + act_calender.name = f"{club}_act_calender.pdf" + + # Update club's activity calendar + club_info = get_object_or_404(Club_info, club_name=club) + club_info.activity_calender = act_calender + club_info.save() + + message = f"Successfully uploaded the calendar for {club} !!!" + + # Prepare response JSON + content = { + 'status': "success", + 'message': message, + } + return Response(content, status=201) # HTTP 201 Created + except Exception as e: + error_message = "Some error occurred" + logger.error(f"Error in uploading activity calendar: {e}") + content = { + 'status': "error", + 'message': error_message, + } + return Response(content, status=500) +class RegistrationFormAPIView(APIView): + """ + API endpoint to handle registration form submissions. + """ + def post(self, request): + """ + Handles POST requests to save registration form data. + """ + try: + # Getting form data + user_name = request.data.get("user_name") + print(user_name) + roll = request.data.get("roll") + cpi = request.data.get("cpi") + branch = request.data.get("branch") + programme = request.data.get("programme") + print(programme) + + # Check if the user has already submitted the form + if Registration_form.objects.filter(user_name=user_name).exists(): + raise Exception("User has already filled the form.") + + # Saving data to the database + registration = Registration_form(user_name=user_name, branch=branch, roll=roll, cpi=cpi, programme=programme) + try: + registration.save() + # If no exception occurred, the save operation was successful + print("Save operation successful") + serializer = Registration_formSerializer(registration) + return Response(serializer.data, status=status.HTTP_201_CREATED) + except Exception as e: + # If an exception occurred, print the error message or log it + print(f"Error occurred while saving registration: {e}") + + print(registration.user_name) + + # Serialize the response + + except Exception as e: + error_message = "Some error occurred" + logger.error(f"Error in registration form submission: {e}") + return Response({"status": "error", "message": error_message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) + def coordinator_club(request): club_info = [] for i in Club_info.objects.all(): @@ -28,6 +109,8 @@ def get(self,request): serializer=Core_teamSerializer(co, many=True) print(serializer.data) return Response(serializer.data) + + class clubname(APIView): permission_classes = [IsAuthenticated] @@ -90,12 +173,251 @@ def get(self,respect): serializer=Voting_pollSerializer(votingpolls, many=True) return Response(serializer.data) -class New_Club(APIView): - permission_classes = [IsAuthenticated] - authentication_classes = [TokenAuthentication] - def post(self,request): - serializer = NewClubSerializer(data=request.data) +class ClubMemberAPIView(APIView): + def get(self, request): + club_members = Club_member.objects.all() + serializer = Club_memberSerializer(club_members, many=True) + return Response(serializer.data) + +class VotingPollAPIView(APIView): + """ + API endpoint to create a new voting poll. + """ + + def post(self, request): + """ + This method handles POST requests to create a new voting poll. + """ + try: + # Initialize serializers + poll_serializer = Voting_pollSerializer(data=request.data) + choices_serializer = Voting_choicesSerializer(data=request.data.get('choices'), many=True) + + # Validate both serializers + poll_valid = poll_serializer.is_valid() + choices_valid = choices_serializer.is_valid() + + if poll_valid and choices_valid: + # Save the validated data + poll_instance = poll_serializer.save() + + # Save choices associated with the poll + choices_serializer.save(poll_event=poll_instance) + + # Print success message + print("Voting poll created successfully") + + # Redirect to a different URL only if necessary + # Modify this logic based on your requirements + if request.accepted_renderer.format == 'html': + return redirect('/gymkhana/') + else: + # Return serialized poll data along with choices + poll_data = poll_serializer.data + poll_data['choices'] = choices_serializer.data + return Response(poll_data, status=status.HTTP_201_CREATED) + else: + # If serializer validation fails, return errors + errors = {} + if not poll_valid: + errors['poll_errors'] = poll_serializer.errors + if not choices_valid: + errors['choices_errors'] = choices_serializer.errors + print(errors) # Log errors to console + return Response(errors, status=status.HTTP_400_BAD_REQUEST) + except Exception as e: + # Log any exceptions that occur during the process + print("Exception occurred:", str(e)) + return Response({"error": str(e)}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) + + +##logger = logging.getLogger(_NamedFuncPointer) + +class NewSessionAPIView(APIView): + """ + API endpoint to create a new session for a club. + """ + + def post(self, request): + """ + Handle POST requests to create a new session. + """ + try: + serializer = Session_infoSerializer(data=request.data) + if serializer.is_valid(): + # Save the validated data + session_instance = serializer.save() + + # Check for conflicts with existing sessions + result = conflict_algorithm_session(session_instance.date, + session_instance.start_time, + session_instance.end_time, + session_instance.venue) + if result == "success": + # Notify users about the new session + getstudents = ExtraInfo.objects.select_related('user', 'department').filter(user_type='student') + recipients = User.objects.filter(extrainfo__in=getstudents) + gymkhana_session(request.user, recipients, 'new_session', session_instance.club, + session_instance.details, session_instance.venue) + + # Print success message + print("Session booked successfully") + + # Redirect to a different URL only if necessary + # Modify this logic based on your requirements + if request.accepted_renderer.format == 'html': + return redirect('/gymkhana/') + else: + return Response(serializer.data, status=status.HTTP_201_CREATED) + else: + return Response({"error": "The selected time slot for the given date and venue conflicts with an already booked session"}, + status=status.HTTP_409_CONFLICT) + else: + # If serializer validation fails, return errors + return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + except Exception as e: + # Log any exceptions that occur during the process + logger.exception("Exception occurred: %s", str(e)) + return Response({"error": "Some error occurred"}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) + + +class DeleteEventsView(APIView): + """ + API endpoint to delete events. + """ + + def post(self, request): + """ + Handle POST requests to delete events. + """ + try: + events_deleted = [] + events_not_found = [] + + # Ensure that request.data is a dictionary + event_data_list = request.data if isinstance(request.data, list) else [] + + for event_data in event_data_list: + name = event_data.get('event_name') + venue = event_data.get('venue') + incharge = event_data.get('incharge') + date = event_data.get('date') + + # Query Event_info based on the provided parameters + event = Event_info.objects.filter( + event_name=name, + venue=venue, + incharge=incharge, + date=date + ).first() + + if event: + event.delete() + events_deleted.append(event_data) + else: + events_not_found.append(event_data) + + response_data = { + "events_deleted": events_deleted, + "events_not_found": events_not_found + } + + return Response(response_data, status=status.HTTP_200_OK) + except Exception as e: + return Response(str(e), status=status.HTTP_500_INTERNAL_SERVER_ERROR) + + + +class DeleteSessionsView(APIView): + """ + API endpoint to delete sessions. + """ + + def post(self, request): + """ + Handle POST requests to delete sessions. + """ + try: + # Get the list of session data from the request + session_data_list = json.loads(request.body) + + sessions_deleted = [] + sessions_not_found = [] + + # Iterate over each session data + for session_data in session_data_list: + venue = session_data.get('venue') + date = session_data.get('date') + start_time = session_data.get('start_time') + end_time = session_data.get('end_time') + details = session_data.get('details') + + # Query Session_info based on the provided parameters + session = Session_info.objects.filter( + venue=venue, + date=date, + start_time=start_time, + end_time=end_time, + details=details + ).first() + + if session: + session.delete() + sessions_deleted.append(session_data) + else: + sessions_not_found.append(session_data) + + response_data = { + "sessions_deleted": sessions_deleted, + "sessions_not_found": sessions_not_found + } + + return JsonResponse(response_data, status=200) + except Exception as e: + return JsonResponse({"error": str(e)}, status=500) + + + + +class NewSessionAPIView(APIView): + def get(self, request): + sessions = Session_info.objects.all() + serializer = Session_infoSerializer(sessions, many=True) + return Response(serializer.data) + + def post(self, request): + serializer =Session_infoSerializer(data=request.data) if serializer.is_valid(): serializer.save() - Response(serializer.data, status=status.HTTP_201_CREATED) - return Response(serializer.errors,status=status.HTTP_400_BAD_REQUEST) + return Response(serializer.data, status=status.HTTP_201_CREATED) + return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + + +class NewEventAPIView(APIView): + def get(self, request): + events = Event_info.objects.all() + serializer = event_infoserializer(events, many=True) + return Response(serializer.data) + + def post(self, request): + serializer = event_infoserializer(data=request.data) + if serializer.is_valid(): + serializer.save() + return Response(serializer.data, status=status.HTTP_201_CREATED) + return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + +class AddMemberToClub(APIView): + def post(self, request): + serializer = Club_memberSerializer(data=request.data) + if serializer.is_valid(): + club_id = request.data.get('club') # Assuming 'club_id' is passed in the request data + try: + club_member = serializer.save() + # Implement logic to add member to the club here + # For example, you can retrieve the club instance and add the member to it + # club = Club.objects.get(pk=club_id) + # club.members.add(club_member) + return Response(serializer.data, status=status.HTTP_201_CREATED) + except Exception as e: + return Response({"error": str(e)}, status=status.HTTP_400_BAD_REQUEST) + return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) \ No newline at end of file diff --git a/FusionIIIT/applications/gymkhana/migrations/__init__.py b/FusionIIIT/applications/gymkhana/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/gymkhana/models.py b/FusionIIIT/applications/gymkhana/models.py index c4513b236..4fa64b432 100644 --- a/FusionIIIT/applications/gymkhana/models.py +++ b/FusionIIIT/applications/gymkhana/models.py @@ -19,34 +19,31 @@ # # Class for various choices on the enumerations class Constants: available = ( - ('On', 'On'), - ('Off', 'Off'), + ("On", "On"), + ("Off", "Off"), ) categoryCh = ( - ('Technical', 'Technical'), - ('Sports', 'Sports'), - ('Cultural', 'Cultural') - ) - status = ( - ('open', 'Open'), - ('confirmed', 'Confirmed'), - ('rejected', 'Rejected') - ) - fest = ( - ('Abhikalpan', 'Abhikalpan'), - ('Gusto', 'Gusto'), - ('Tarang', 'Tarang') + ("Technical", "Technical"), + ("Sports", "Sports"), + ("Cultural", "Cultural"), ) + status = (("open", "Open"), ("confirmed", "Confirmed"), ("rejected", "Rejected")) + fest = (("Abhikalpan", "Abhikalpan"), ("Gusto", "Gusto"), ("Tarang", "Tarang")) venue = ( - ('Classroom', ( - ('CR101', 'CR101'), - ('CR102', 'CR102'), - )), - ('Lecturehall', ( - ('L101', 'L101'), - ('L102', 'L102'), - )), - + ( + "Classroom", + ( + ("CR101", "CR101"), + ("CR102", "CR102"), + ), + ), + ( + "Lecturehall", + ( + ("L101", "L101"), + ("L102", "L102"), + ), + ), ) @@ -58,7 +55,7 @@ class Club_info(models.Model): club_name - name of the club club_website - url of the club website - category - to which category it belongs to + category - to which category it belongs to co_ordinator - refers to the id of co_ordinator of the club co_coordinator - refers to the id of co_coordinator of the club faculty_incharge - the lecturer/proffesor who is incharge of this club. @@ -66,41 +63,50 @@ class Club_info(models.Model): activity_calender - it is the url of club logo description - refers to brief explanation about the club alloted_budget - the amount alloted to the club - spent_budget - the amount spent by the club + spent_budget - the amount spent by the club avail_budget - the amount available at the club status - status of club wheather it is confirmed or not """ + club_name = models.CharField(max_length=50, null=False, primary_key=True) club_website = models.CharField(max_length=150, null=True, default="hello") - category = models.CharField( - max_length=50, null=False, choices=Constants.categoryCh) - co_ordinator = models.ForeignKey(Student, on_delete=models.CASCADE, null=False, related_name='co_of') + category = models.CharField(max_length=50, null=False, choices=Constants.categoryCh) + co_ordinator = models.ForeignKey( + Student, on_delete=models.CASCADE, null=False, related_name="co_of" + ) co_coordinator = models.ForeignKey( - Student, on_delete=models.CASCADE, null=False, related_name='coco_of') + Student, on_delete=models.CASCADE, null=False, related_name="coco_of" + ) faculty_incharge = models.ForeignKey( - Faculty, on_delete=models.CASCADE, null=False, related_name='faculty_incharge_of') - club_file = models.FileField(upload_to='gymkhana/club_poster', null=True) + Faculty, + on_delete=models.CASCADE, + null=False, + related_name="faculty_incharge_of", + ) + club_file = models.FileField(upload_to="gymkhana/club_poster", null=True) activity_calender = models.FileField( - upload_to='gymkhana/activity_calender', null=True, default=" ") + upload_to="gymkhana/activity_calender", null=True, default=" " + ) description = models.TextField(max_length=256, null=True) alloted_budget = models.IntegerField(null=True, default=0) spent_budget = models.IntegerField(null=True, default=0) avail_budget = models.IntegerField(null=True, default=0) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") + head_changed_on = models.DateField(default=timezone.now, auto_now=False, null=True) + created_on = models.DateField(default=timezone.now, auto_now=False, null=True) def __str__(self): return str(self.club_name) class Meta: - db_table = 'Club_info' + db_table = "Club_info" class Form_available(models.Model): """ It stores registered form name , roll number and status. - + roll - roll number of the student status - it is a boolean value wheather the form is available or not form_name - name of the form @@ -109,13 +115,14 @@ class Form_available(models.Model): roll = models.CharField(default=2016001, max_length=7, primary_key=True) status = models.BooleanField(default=True, max_length=5) - form_name = models.CharField(default='senate_registration', max_length=30) + form_name = models.CharField(default="senate_registration", max_length=30) def __str__(self): return str(self.roll) class Meta: - db_table = 'Form_available' + db_table = "Form_available" + class Registration_form(models.Model): """ @@ -129,17 +136,17 @@ class Registration_form(models.Model): """ - roll = models.CharField(max_length=7, default="2016001", primary_key=True) + roll = models.CharField(max_length=8, default="20160017", primary_key=True) user_name = models.CharField(max_length=40, default="Student") - branch = models.CharField(max_length=20, default='open') + branch = models.CharField(max_length=20, default="open") cpi = models.FloatField(max_length=3, default=6.0) - programme = models.CharField(max_length=20, default='B.tech') + programme = models.CharField(max_length=20, default="B.tech") def __str__(self): return str(self.roll) class Meta: - db_table = 'Registration_form' + db_table = "Registration_form" class Club_member(models.Model): @@ -154,22 +161,23 @@ class Club_member(models.Model): remarks - remarks of the student by the club if any. """ + id = models.AutoField(primary_key=True) member = models.ForeignKey( - Student, on_delete=models.CASCADE, related_name='member_of') - club = models.ForeignKey(Club_info, on_delete=models.CASCADE, related_name='this_club', null=False) + Student, on_delete=models.CASCADE, related_name="member_of" + ) + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, related_name="this_club", null=False + ) description = models.TextField(max_length=256, null=True) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") remarks = models.CharField(max_length=256, null=True) def __str__(self): return str(self.member.id) class Meta: - db_table = 'Club_member' - - + db_table = "Club_member" class Core_team(models.Model): @@ -186,13 +194,14 @@ class Core_team(models.Model): remarks - remarks(if there are any) in the fest """ + id = models.AutoField(primary_key=True) student_id = models.ForeignKey( - Student, on_delete=models.CASCADE, related_name='applied_for') + Student, on_delete=models.CASCADE, related_name="applied_for" + ) team = models.CharField(max_length=50, null=False) year = models.DateTimeField(max_length=6, null=True) - fest_name = models.CharField( - max_length=256, null=False, choices=Constants.fest) + fest_name = models.CharField(max_length=256, null=False, choices=Constants.fest) pda = models.TextField(max_length=256, null=False) remarks = models.CharField(max_length=256, null=True) @@ -200,38 +209,36 @@ def __str__(self): return str(self.student_id) class Meta: - db_table = 'Core_team' + db_table = "Core_team" class Club_budget(models.Model): - """ Records the budget details of the clubs. - id - serial number club - name of the club budget_for - the purpose of the budget,like for equipment or for event etc.., budget_amt - the amount required for the club budget_file - it is file which contains complete details regarding the amount they want to spend descrion - description about the budget if any - """ id = models.AutoField(primary_key=True) - club = models.ForeignKey(Club_info,on_delete=models.CASCADE, max_length=50, null=False) + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, max_length=50, null=False + ) budget_for = models.CharField(max_length=256, null=False) budget_amt = models.IntegerField(default=0, null=False) - budget_file = models.FileField(upload_to='uploads/', null=False) + budget_file = models.FileField(upload_to="uploads/", null=False) description = models.TextField(max_length=256, null=False) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") remarks = models.CharField(max_length=256, null=True) def __str__(self): return str(self.id) class Meta: - db_table = 'Club_budget' + db_table = "Club_budget" class Session_info(models.Model): @@ -241,31 +248,32 @@ class Session_info(models.Model): id - serial number club - name of the club venue - the place at which they conducting the session - date - date of the session + date - date of the session start_time - the time at which session starts end_time - the time at which session ends session_poster - the logo/poster for the session(image) details - for which purpose they are taking the session status - wheather it is approved/rejected. - """ + id = models.AutoField(primary_key=True) - club = models.ForeignKey(Club_info, on_delete=models.CASCADE,max_length=50, null=True) - venue = models.CharField(max_length=50, null=False, - choices=Constants.venue) + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, max_length=50, null=True + ) + venue = models.CharField(max_length=50, null=False, choices=Constants.venue) date = models.DateField(default=None, auto_now=False, null=False) start_time = models.TimeField(default=None, auto_now=False, null=False) - end_time = models.TimeField(default=None, auto_now=False, null=True) - session_poster = models.ImageField(upload_to='gymkhana/session_poster', null=True) + end_time = models.TimeField(default=None, auto_now=False, null=False) + session_poster = models.ImageField(upload_to="gymkhana/session_poster", null=True) details = models.TextField(max_length=256, null=True) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") def __str__(self): return str(self.id) class Meta: - db_table = 'Session_info' + db_table = "Session_info" + class Event_info(models.Model): """ @@ -286,24 +294,24 @@ class Event_info(models.Model): """ id = models.AutoField(primary_key=True) - club = models.ForeignKey(Club_info, on_delete=models.CASCADE,max_length=50, null=True) - event_name= models.CharField(max_length=256, null=False) - venue = models.CharField(max_length=50, null=False, - choices=Constants.venue) - incharge=models.CharField(max_length=256, null=False) + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, max_length=50, null=True + ) + event_name = models.CharField(max_length=256, null=False) + venue = models.CharField(max_length=50, null=False, choices=Constants.venue) + incharge = models.CharField(max_length=256, null=False) date = models.DateField(default=None, auto_now=False, null=False) start_time = models.TimeField(default=None, auto_now=False, null=False) end_time = models.TimeField(default=None, auto_now=False, null=True) - event_poster = models.FileField(upload_to='gymkhana/event_poster', blank=True) + event_poster = models.FileField(upload_to="gymkhana/event_poster", blank=True) details = models.TextField(max_length=256, null=True) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") def __str__(self): return str(self.id) class Meta: - db_table = 'Event_info' + db_table = "Event_info" class Club_report(models.Model): @@ -322,19 +330,22 @@ class Club_report(models.Model): """ id = models.AutoField(primary_key=True) - club = models.ForeignKey(Club_info, on_delete=models.CASCADE,max_length=50, null=False) - incharge = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE,max_length=256, null=False) + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, max_length=50, null=False + ) + incharge = models.ForeignKey( + ExtraInfo, on_delete=models.CASCADE, max_length=256, null=False + ) event_name = models.CharField(max_length=50, null=False) - date = models.DateTimeField( - max_length=50, default=timezone.now, blank=True) - event_details = models.FileField(upload_to='uploads/', null=False) + date = models.DateTimeField(max_length=50, default=timezone.now, blank=True) + event_details = models.FileField(upload_to="uploads/", null=False) description = models.TextField(max_length=256, null=True) def __str__(self): return str(self.id) class Meta: - db_table = 'Club_report' + db_table = "Club_report" class Fest_budget(models.Model): @@ -349,56 +360,57 @@ class Fest_budget(models.Model): description - brief explanation regarding budget if any status - wheather budget is approved or rejected remarks - negative things regarding budget - + """ id = models.AutoField(primary_key=True) fest = models.CharField(max_length=50, null=False, choices=Constants.fest) budget_amt = models.IntegerField(default=0, null=False) - budget_file = models.FileField(upload_to='uploads/', null=False) + budget_file = models.FileField(upload_to="uploads/", null=False) year = models.CharField(max_length=10, null=True) description = models.TextField(max_length=256, null=False) - status = models.CharField( - max_length=50, choices=Constants.status, default='open') + status = models.CharField(max_length=50, choices=Constants.status, default="open") remarks = models.CharField(max_length=256, null=True) def __str__(self): return str(self.id) class Meta: - db_table = 'Fest_budget' + db_table = "Fest_budget" class Other_report(models.Model): """ This model also stores details of the events conducting by all clubs irrespective of the clubs. - + id - serial number incharge - name of faculty who is incharge for the event date - date of the event event_details - for which purpose they are conducting the event - description - brief explanation about event if needed + description - brief explanation about event if needed """ + id = models.AutoField(primary_key=True) - incharge = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE,max_length=256, null=False) + incharge = models.ForeignKey( + ExtraInfo, on_delete=models.CASCADE, max_length=256, null=False + ) event_name = models.CharField(max_length=50, null=False) - date = models.DateTimeField( - max_length=50, default=timezone.now, blank=True) - event_details = models.FileField(upload_to='uploads/', null=False) + date = models.DateTimeField(max_length=50, default=timezone.now, blank=True) + event_details = models.FileField(upload_to="uploads/", null=False) description = models.TextField(max_length=256, null=True) def __str__(self): return str(self.id) class Meta: - db_table = 'Other_report' + db_table = "Other_report" class Change_office(models.Model): """ - + id - serial number club - name of the club @@ -410,15 +422,19 @@ class Change_office(models.Model): remarks - remarks if there are any. """ + id = models.AutoField(primary_key=True) - club = models.ForeignKey(Club_info, on_delete=models.CASCADE,max_length=50, null=False) - co_ordinator = models.ForeignKey(User, on_delete=models.CASCADE,null=False, related_name='co_of') + club = models.ForeignKey( + Club_info, on_delete=models.CASCADE, max_length=50, null=False + ) + co_ordinator = models.ForeignKey( + User, on_delete=models.CASCADE, null=False, related_name="co_of" + ) co_coordinator = models.ForeignKey( - User, on_delete=models.CASCADE, null=False, related_name='coco_of') - status = models.CharField( - max_length=50, choices=Constants.status, default='open') - date_request = models.DateTimeField( - max_length=50, default=timezone.now, blank=True) + User, on_delete=models.CASCADE, null=False, related_name="coco_of" + ) + status = models.CharField(max_length=50, choices=Constants.status, default="open") + date_request = models.DateTimeField(max_length=50, default=timezone.now, blank=True) date_approve = models.DateTimeField(max_length=50, blank=True) remarks = models.CharField(max_length=256, null=True) @@ -426,7 +442,7 @@ def __str__(self): return self.id class Meta: - db_table = 'Change_office' + db_table = "Change_office" class Voting_polls(models.Model): @@ -441,21 +457,23 @@ class Voting_polls(models.Model): groups - the groups that are participating in the voting """ - - title = models.CharField(max_length=200,null=False) - description = models.CharField(max_length=5000,null=False) + + title = models.CharField(max_length=200, null=False) + description = models.CharField(max_length=5000, null=False) pub_date = models.DateTimeField(default=timezone.now) exp_date = models.DateTimeField(default=timezone.now) - created_by = models.CharField(max_length=100,null=True) - groups = models.CharField(max_length=500,default='{}') - + created_by = models.CharField(max_length=100, null=True) + groups = models.CharField(max_length=500, default="{}") + def groups_data(self): return self.groups def __str__(self): return self.title + class Meta: - ordering = ['-pub_date'] + ordering = ["-pub_date"] + class Voting_choices(models.Model): """ @@ -467,15 +485,16 @@ class Voting_choices(models.Model): """ poll_event = models.ForeignKey(Voting_polls, on_delete=models.CASCADE) - title = models.CharField(max_length=200,null=False) - description = models.CharField(max_length=500,default='') + title = models.CharField(max_length=200, null=False) + description = models.CharField(max_length=500, default="") votes = models.IntegerField(default=0) def __str__(self): return self.title - + class Meta: - get_latest_by = 'votes' + get_latest_by = "votes" + class Voting_voters(models.Model): """ @@ -485,11 +504,9 @@ class Voting_voters(models.Model): student_id - roll number of student """ - + poll_event = models.ForeignKey(Voting_polls, on_delete=models.CASCADE) student_id = models.CharField(max_length=50, null=False) - - + def __str__(self): return self.student_id - diff --git a/FusionIIIT/applications/gymkhana/templatetags/voters_tag.py b/FusionIIIT/applications/gymkhana/templatetags/voters_tag.py index 408e7b643..3cb86ce50 100644 --- a/FusionIIIT/applications/gymkhana/templatetags/voters_tag.py +++ b/FusionIIIT/applications/gymkhana/templatetags/voters_tag.py @@ -4,23 +4,15 @@ toggel = False -## A tag function to find whether to show the poll to the user or not @register.simple_tag def validate(user, groups): - - roll = user.username[:4] + roll = user.username[:5] branch = user.extrainfo.department.name - print(groups) - if roll in groups.keys(): - if groups[roll][0] == 'All': + if roll in groups: + allowed_branches = groups[roll] + if 'All' in allowed_branches or branch in allowed_branches: return True - else: - if branch in groups[roll]: - return True - else: - return False - else: - return False + return False @register.simple_tag def result(): diff --git a/FusionIIIT/applications/gymkhana/urls.py b/FusionIIIT/applications/gymkhana/urls.py index c2df1a840..22fb7076e 100644 --- a/FusionIIIT/applications/gymkhana/urls.py +++ b/FusionIIIT/applications/gymkhana/urls.py @@ -1,6 +1,8 @@ from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns -from applications.gymkhana.api.views import clubname,Club_Details,club_events,club_budgetinfo,Fest_Budget,club_report,Registraion_form, New_Club, session_details, Voting_Polls +from applications.gymkhana.api.views import AddMemberToClub, ClubMemberAPIView, DeleteEventsView, DeleteSessionsView, NewEventAPIView, NewSessionAPIView, Voting_Polls +from applications.gymkhana.api.views import clubname,Club_Details,club_events,club_budgetinfo,Fest_Budget,club_report,Registraion_form +from applications.gymkhana.api.views import session_details from . import views from rest_framework.authtoken.views import obtain_auth_token @@ -13,30 +15,35 @@ #academic administration url(r'^club_approve/$', views.club_approve, name='club_approve'), url(r'^club_reject/$', views.club_reject, name='club_reject'), + url(r'^budget_approve/$', views.budget_approve, name='budget_approve'), + url(r'^budget_reject/$', views.budget_reject, name='budget_reject'), # This is post method which takes username and password to generates/return Token - url(r'^api/login/$', obtain_auth_token, name='login'), + url(r'^login/$', obtain_auth_token, name='login'), # api for "clubdetails" method="get" with TokenAuthentication - url(r'^api/clubdetails/$', Club_Details.as_view()), + url(r'^clubdetails/$', Club_Details.as_view()), # api for "clubname" method="get" with TokenAuthentication - url(r'^api/Fest_budget/$',Fest_Budget.as_view(),name='Fest_budget'), + url(r'^Fest_budget/$',Fest_Budget.as_view(),name='Fest_budget'), # api for "festbudget" method="get" with TokenAuthentication - url(r'^api/club_report/$',club_report.as_view()), + url(r'^club_report/$',club_report.as_view()), # api for "club_report" method="get" with TokenAuthentication - url(r'^api/registration_form/$',Registraion_form.as_view()), + url(r'^registration_form/$',Registraion_form.as_view()), # api for "registration_form" method="get" with TokenAuthentication - url(r'^api/voting_polls/$',Voting_Polls.as_view()), + url(r'^voting_polls/$',Voting_Polls.as_view()), # api for "voting_polls" method="get" with TokenAuthentication - url(r'^api/new_club/$',New_Club.as_view()), - # api for "New Club" method="get" with TokenAuthentication - + url(r'^api/new_event/$',NewEventAPIView.as_view(), name='new_event_api'), + url(r'^api/club_membership/$', AddMemberToClub.as_view(), name='new_club_member'), + url(r'^api/delete_event/$', DeleteEventsView.as_view(), name='delete_events_api'), + url(r'^api/delete_sessions/$', DeleteSessionsView.as_view(), name='delete_sessions_api'), + url(r'^api/new_session/$',NewSessionAPIView.as_view(), name='new_session_api'), url(r'^clubname/$', clubname.as_view()), url(r'^$', views.gymkhana, name='gymkhana'), url(r'^delete_requests/$', views.delete_requests, name='delete_requests'), url(r'^form_avail/$', views.form_avail, name='form_avail'), url(r'^registration_form/$', views.registration_form, name='registration_form'), url(r'^new_club/$', views.new_club, name='new_club'), + url(r'^api/members_records/$', ClubMemberAPIView.as_view(), name='club_members'), #club_head url(r'^approve/$', views.approve, name='approve'), @@ -76,4 +83,4 @@ url(r'^core_team/$', views.core_team, name='core_team'), url(r'^festbudget/$', views.fest_budget, name='fest_budget'), -] +] \ No newline at end of file diff --git a/FusionIIIT/applications/gymkhana/views.py b/FusionIIIT/applications/gymkhana/views.py index e6f885ec6..16fb23773 100644 --- a/FusionIIIT/applications/gymkhana/views.py +++ b/FusionIIIT/applications/gymkhana/views.py @@ -1,18 +1,28 @@ from django.contrib import messages from django.contrib.auth.decorators import login_required +from django.contrib.auth.models import User +from django.http import HttpResponse from django.shortcuts import get_object_or_404, redirect, render from django.utils.dateparse import parse_date from django.db.models import Q from bisect import bisect +from django.contrib import messages from django.shortcuts import * -from applications.filetracking.models import File, Tracking +from applications.filetracking.models import File, Tracking from django.template.defaulttags import csrf_token from django.http import HttpResponse, HttpResponseRedirect, JsonResponse +from django.contrib.auth.decorators import login_required from django.db import IntegrityError from django.core import serializers from django.contrib.auth.models import User from timeit import default_timer as time -from notification.views import gymkhana_voting, office_module_notif, gymkhana_session, gymkhana_event +from notification.views import ( + gymkhana_voting, + office_module_notif, + gymkhana_session, + gymkhana_event, +) +from applications.globals.models import HoldsDesignation from django.views.decorators.csrf import ensure_csrf_cookie from applications.academic_information.models import Student from applications.globals.models import * @@ -25,1851 +35,2391 @@ import logging logger = logging.getLogger(__name__) + + def coordinator_club(request): - """ - coordinator_club: - this function is used to return the details of the Club_info of the requested user - if the user is either the coordinator or the cocoordinator of the club - @param: - request - trivial - @variables: - details - contains the Club_info - co_ordinator - contains the details of the Club co_ordinator - co_coordinator - contains the details of the Club co_coordinator - """ - for details in Club_info.objects.select_related('co_ordinator','co_ordinator__id','co_ordinator__id__user','co_ordinator__id__department','co_coordinator','co_coordinator__id','co_coordinator__id__user','co_coordinator__id__department','faculty_incharge','faculty_incharge__id','faculty_incharge__id__user','faculty_incharge__id__department').all(): - co_ordinator= (str(details.co_ordinator)).split(" ") - co_coordinator= (str(details.co_coordinator)).split(" ") - if co_ordinator[0] == str(request.user) or co_coordinator[0] == str(request.user) : - return(details) + """ + coordinator_club: + this function is used to return the details of the Club_info of the requested user + if the user is either the coordinator or the cocoordinator of the club + @param: + request - trivial + @variables: + details - contains the Club_info + co_ordinator - contains the details of the Club co_ordinator + co_coordinator - contains the details of the Club co_coordinator + """ + for details in Club_info.objects.select_related( + "co_ordinator", + "co_ordinator__id", + "co_ordinator__id__user", + "co_ordinator__id__department", + "co_coordinator", + "co_coordinator__id", + "co_coordinator__id__user", + "co_coordinator__id__department", + "faculty_incharge", + "faculty_incharge__id", + "faculty_incharge__id__user", + "faculty_incharge__id__department", + ).all(): + co_ordinator = (str(details.co_ordinator)).split(" ") + co_coordinator = (str(details.co_coordinator)).split(" ") + if co_ordinator[0] == str(request.user) or co_coordinator[0] == str( + request.user + ): + return details + @csrf_exempt def delete_sessions(request): - """ - delete_sessions: - This view deletes the session based on the request_id in Session_info - if it runs without exception then it deletes and return the result : success - if not then it just returns the result : error - @param: - request - trivial - @variables: - selectedIds - contains the id of the request - delSession - this contains the details of Session which needs to be deleted based on the SelectedIds from Session_info - - """ - selectedIds = request.POST['ids'] - selectedIds = json.loads(selectedIds) - try: - for ids in selectedIds: - delSession = Session_info.objects.get(id=ids) - delSession.delete() - return HttpResponse("success") - except Exception as e: - logger.error("An error was encountered") - return HttpResponse("error") + """ + delete_sessions: + This view deletes the session based on the request_id in Session_info + if it runs without exception then it deletes and return the result : success + if not then it just returns the result : error + @param: + request - trivial + @variables: + selectedIds - contains the id of the request + delSession - this contains the details of Session which needs to be deleted based on the SelectedIds from Session_info + + """ + selectedIds = request.POST["ids"] + selectedIds = json.loads(selectedIds) + try: + for ids in selectedIds: + delSession = Session_info.objects.get(id=ids) + delSession.delete() + return HttpResponse("success") + except Exception as e: + logger.error("An error was encountered") + return HttpResponse("error") def editsession(request, session_id): - """ - editsession: - This function is used to edit the club_sessions for clubs by their users. - By using this the club user can edit the session. - If the given date and time and venue clasheswith already booked session it doesn't edit the session. - And it displays success if there is no exception and displays error if there is an exception. - - @param: - request - trivial - - @variables: - venue - the place/room at which the session is going to happen - session_poster - it is a file that has to be uploaded which contains the poster for session - date - the date at which session is going to happen - start_time - the time at which session is going to start - end_time - the time at which session is going to end - desc - brief explanation about session if any - club_name - requests the coordinator_club and it returns - result - checks wheather the date,time,venue clashes with other session using conflict_algorithm_session view - session - if result is success then the session books successfully - - - """ - if request.method == 'POST': - try: - body = request.POST - venue = body.get('venue_type') - session_poster = request.FILES.get('session_poster') - date = body.get('date') - start_time = body.get('start_time') - end_time = body.get('end_time') - desc = body.get('d_d') - club_name = coordinator_club(request) - result = conflict_algorithm_session(date, start_time, end_time, venue) - message = "" - if (result == 'success'): - event = Session_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').get(id=session_id) - event.club = club_name - event.venue = venue - event.date = date - event.start_time = start_time - event.end_time = end_time - event.session_poster = session_poster - event.details = desc - event.save() - # e = Session_info.objects.filter(id=session_id).update(club=club_name,venue=venue, date=date,start_time=start_time, end_time=end_time, session_poster=session_poster, details=desc) - message += "Your form has been dispatched for further process" - return redirect('/gymkhana/') - else: - message += "The selected time slot for the given date and venue conflicts with already booked session" - except Exception as e: - result = "error" - message = "Some error occurred" - logger.info(message,e) - - ##Get Request - # Session_info.objects(club=club_name,venue=venue,date=date,start_time=start_time,end_time=end_time,session_poster=session_poster, details=desc) - venue = [] - event = Session_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').get(pk=session_id) - - for rooms in Constants.venue: - for venues in rooms[1]: - venue.append(venues[0]) - context = { - 'form': { - "venue": event.venue, - "session_poster": event.session_poster, - "date": datetime.datetime.strftime(event.date, '%Y-%m-%d'), - "start_time": event.start_time, - "end_time": event.end_time, - "desc": event.details, - "club_name": event.club, - "Venue": venue, - "id": session_id - } - } - # res = conflict_algorithm_event(date, start_time, end_time, venue) - template = 'gymkhanaModule/editsession.html' - - return render(request, template, context) + """ + editsession: + This function is used to edit the club_sessions for clubs by their users. + By using this the club user can edit the session. + If the given date and time and venue clasheswith already booked session it doesn't edit the session. + And it displays success if there is no exception and displays error if there is an exception. + + @param: + request - trivial + + @variables: + venue - the place/room at which the session is going to happen + session_poster - it is a file that has to be uploaded which contains the poster for session + date - the date at which session is going to happen + start_time - the time at which session is going to start + end_time - the time at which session is going to end + desc - brief explanation about session if any + club_name - requests the coordinator_club and it returns + result - checks wheather the date,time,venue clashes with other session using conflict_algorithm_session view + session - if result is success then the session books successfully + + + """ + if request.method == "POST": + try: + body = request.POST + venue = body.get("venue_type") + session_poster = request.FILES.get("session_poster") + date = body.get("date") + start_time = body.get("start_time") + end_time = body.get("end_time") + desc = body.get("d_d") + club_name = coordinator_club(request) + result = conflict_algorithm_session(date, start_time, end_time, venue) + message = "" + if result == "success": + event = Session_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).get(id=session_id) + event.club = club_name + event.venue = venue + event.date = date + event.start_time = start_time + event.end_time = end_time + event.session_poster = session_poster + event.details = desc + event.save() + # e = Session_info.objects.filter(id=session_id).update(club=club_name,venue=venue, date=date,start_time=start_time, end_time=end_time, session_poster=session_poster, details=desc) + message += "Your form has been dispatched for further process" + return redirect("/gymkhana/") + else: + message += "The selected time slot for the given date and venue conflicts with already booked session" + except Exception as e: + result = "error" + message = "Some error occurred" + logger.info(message, e) + + ##Get Request + # Session_info.objects(club=club_name,venue=venue,date=date,start_time=start_time,end_time=end_time,session_poster=session_poster, details=desc) + venue = [] + event = Session_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).get(pk=session_id) + + for rooms in Constants.venue: + for venues in rooms[1]: + venue.append(venues[0]) + context = { + "form": { + "venue": event.venue, + "session_poster": event.session_poster, + "date": datetime.datetime.strftime(event.date, "%Y-%m-%d"), + "start_time": event.start_time, + "end_time": event.end_time, + "desc": event.details, + "club_name": event.club, + "Venue": venue, + "id": session_id, + } + } + # res = conflict_algorithm_event(date, start_time, end_time, venue) + template = "gymkhanaModule/editsession.html" + + return render(request, template, context) @csrf_exempt def delete_events(request): - """ - delete_events: - This view deletes the event based on the request_id in Event_info - if it runs without exception then it deletes and return the result : success - if not then it just returns the result : error - @param: - request - trivial - @variables: - selectedIds - contains the id of the request - delEvent - this contains the details of Event which needs to be deleted based on the SelectedIds from Event_info - - """ - selectedIds = request.POST['ids'] - selectedIds = json.loads(selectedIds) - message = "" - try: - for ids in selectedIds: - delEvent = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').get(id=ids) - delEvent.delete() - return HttpResponse("success") - except Exception as e: - logger.error("An error was encountered") - return HttpResponse("error") - -def edit_event(request,event_id): - # event = Event_info.objects.get(pk=event_id) - """ - edit_event: - This function is used to edit the club_event for clubs by their users. - By using this the club user can edit the event. - If the given date and time and venue clasheswith already booked session it doesn't edit the event. - And it displays success if there is no exception and displays error if there is an exception. - - @param: - request - trivial - - @variables: - venue - the place/room at which the event is going to happen - event_name - it has the name of the event - date - the date at which event is going to happen - start_time - the time at which event is going to start - end_time - the time at which event is going to end - desc - brief explanation about event if any - club_name - requests the coordinator_club and it returns - result - checks wheather the date,time,venue clashes with other event using conflict_algorithm_session view - event - if result is success then the event books successfully - - """ - if request.method == 'POST': - try: - body = request.POST - event_name = body.get('event_name') - incharge=body.get('incharge') - venue = body.get('venue_type') - event_poster = request.FILES.get('event_poster') - date = body.get('date') - start_time = body.get('start_time') - end_time = body.get('end_time') - desc = body.get('d_d') - club_name = coordinator_club(request) - result = conflict_algorithm_event(date, start_time, end_time, venue) - message = "" - if(result == 'success'): - event = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').get(id=event_id) - event.club = club_name - event.event_name = event_name - event.incharge = incharge - event.venue = venue - event.date = date - event.start_time = start_time - event.end_time = end_time - event.event_poster = event_poster - event.details = desc - event.save() - # e = Event_info.objects.filter(id=event_id).update(club = club_name, event_name=event_name, incharge=incharge, venue = venue, date =date, start_time=start_time , end_time = end_time ,event_poster = event_poster , details = desc) - message += "Your form has been dispatched for further process" - return redirect('/gymkhana/') - else: - message += "The selected time slot for the given date and venue conflicts with already booked session" - except Exception as e: - result = "error" - message = "Some error occurred" - logger.info(message,e) - - - ##Get Request - # Event_info(club = club_name, event_name=event_name, incharge=incharge, venue = venue, date =date, start_time=start_time , end_time = end_time ,event_poster = event_poster , details = desc) - venue = [] - event = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').get(pk=event_id) - - for rooms in Constants.venue: - for venues in rooms[1]: - venue.append(venues[0]) - context = { - 'form':{ - "event_name":event.event_name, - "incharge":event.incharge, - "venue" : event.venue, - "event_poster" : event.event_poster, - "date":datetime.datetime.strftime(event.date,'%Y-%m-%d'), - "start_time": event.start_time, - "end_time" : event.end_time, - "desc" : event.details, - "club_name" : event.club, - "Venue": venue, - "id":event_id - } - } - # res = conflict_algorithm_event(date, start_time, end_time, venue) - template='gymkhanaModule/editevent.html' - - return render(request,template,context) + """ + delete_events: + This view deletes the event based on the request_id in Event_info + if it runs without exception then it deletes and return the result : success + if not then it just returns the result : error + @param: + request - trivial + @variables: + selectedIds - contains the id of the request + delEvent - this contains the details of Event which needs to be deleted based on the SelectedIds from Event_info + + """ + selectedIds = request.POST["ids"] + selectedIds = json.loads(selectedIds) + message = "" + try: + for ids in selectedIds: + delEvent = Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).get(id=ids) + delEvent.delete() + return HttpResponse("success") + except Exception as e: + logger.error("An error was encountered") + return HttpResponse("error") + + +def edit_event(request, event_id): + # event = Event_info.objects.get(pk=event_id) + """ + edit_event: + This function is used to edit the club_event for clubs by their users. + By using this the club user can edit the event. + If the given date and time and venue clasheswith already booked session it doesn't edit the event. + And it displays success if there is no exception and displays error if there is an exception. + + @param: + request - trivial + + @variables: + venue - the place/room at which the event is going to happen + event_name - it has the name of the event + date - the date at which event is going to happen + start_time - the time at which event is going to start + end_time - the time at which event is going to end + desc - brief explanation about event if any + club_name - requests the coordinator_club and it returns + result - checks wheather the date,time,venue clashes with other event using conflict_algorithm_session view + event - if result is success then the event books successfully + + """ + if request.method == "POST": + try: + body = request.POST + event_name = body.get("event_name") + incharge = body.get("incharge") + venue = body.get("venue_type") + event_poster = request.FILES.get("event_poster") + date = body.get("date") + start_time = body.get("start_time") + end_time = body.get("end_time") + desc = body.get("d_d") + club_name = coordinator_club(request) + result = conflict_algorithm_event(date, start_time, end_time, venue) + message = "" + if result == "success": + event = Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).get(id=event_id) + event.club = club_name + event.event_name = event_name + event.incharge = incharge + event.venue = venue + event.date = date + event.start_time = start_time + event.end_time = end_time + event.event_poster = event_poster + event.details = desc + event.save() + # e = Event_info.objects.filter(id=event_id).update(club = club_name, event_name=event_name, incharge=incharge, venue = venue, date =date, start_time=start_time , end_time = end_time ,event_poster = event_poster , details = desc) + message += "Your form has been dispatched for further process" + return redirect("/gymkhana/") + else: + message += "The selected time slot for the given date and venue conflicts with already booked session" + except Exception as e: + result = "error" + message = "Some error occurred" + logger.info(message, e) + + ##Get Request + # Event_info(club = club_name, event_name=event_name, incharge=incharge, venue = venue, date =date, start_time=start_time , end_time = end_time ,event_poster = event_poster , details = desc) + venue = [] + event = Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).get(pk=event_id) + + for rooms in Constants.venue: + for venues in rooms[1]: + venue.append(venues[0]) + context = { + "form": { + "event_name": event.event_name, + "incharge": event.incharge, + "venue": event.venue, + "event_poster": event.event_poster, + "date": datetime.datetime.strftime(event.date, "%Y-%m-%d"), + "start_time": event.start_time, + "end_time": event.end_time, + "desc": event.details, + "club_name": event.club, + "Venue": venue, + "id": event_id, + } + } + # res = conflict_algorithm_event(date, start_time, end_time, venue) + template = "gymkhanaModule/editevent.html" + + return render(request, template, context) + def delete_memberform(request): - """ - delete_memberform: - This view deletes the memberform based on the request_id in Club_member - if it runs without exception then it deletes and return the result : success - if not then it just returns the result : error - @param: - request - trivial - @variables: - selectedIds - contains the id of the request - delMemberform - this contains the details of member which needs to be deleted based on the SelectedIds from Club_member - - """ - selectedIds = request.POST['ids'] - selectedIds = json.loads(selectedIds) - try: - for ids in selectedIds: - delMemberform = Club_member.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department','member','member__id','member__id__user','member__id__department').get(id=ids) - delMemberform.delete() - return HttpResponse("success") - except Exception as e: - logger.error("An error was encountered") - return HttpResponse("error") + """ + delete_memberform: + This view deletes the memberform based on the request_id in Club_member + if it runs without exception then it deletes and return the result : success + if not then it just returns the result : error + @param: + request - trivial + @variables: + selectedIds - contains the id of the request + delMemberform - this contains the details of member which needs to be deleted based on the SelectedIds from Club_member + + """ + selectedIds = request.POST["ids"] + selectedIds = json.loads(selectedIds) + try: + for ids in selectedIds: + delMemberform = Club_member.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + "member", + "member__id", + "member__id__user", + "member__id__department", + ).get(id=ids) + delMemberform.delete() + return HttpResponse("success") + except Exception as e: + logger.error("An error was encountered") + return HttpResponse("error") + def facultyData(request): - """ - facultyData: - this function is used to return the facultyNames from the ExtraInfo of the requested value which are not present in the current value - @param: - request - trivial - @variables: - faculty - contains the Extrainfo of the faculty - facultyName - contains the list of faculties firstname and lastname - name - contains the lecturers first name and the last name - """ - current_value = request.POST['current_value'] - try: - # students =ExtraInfo.objects.all().filter(user_type = "student") - faculty = ExtraInfo.objects.select_related('user','department').all().filter(user_type = "faculty") - facultyNames = [] - for lecturer in faculty: - name = lecturer.user.first_name + " " +lecturer.user.last_name - if current_value != "": - Lowname = name.lower() - Lowcurrent_value = current_value.lower() - if Lowcurrent_value in Lowname: - facultyNames.append(name) - else: - facultyNames.append(name) - faculty = json.dumps(facultyNames) - return HttpResponse(faculty) - except Exception as e: - return HttpResponse("error") + """ + facultyData: + this function is used to return the facultyNames from the ExtraInfo of the requested value which are not present in the current value + @param: + request - trivial + @variables: + faculty - contains the Extrainfo of the faculty + facultyName - contains the list of faculties firstname and lastname + name - contains the lecturers first name and the last name + """ + current_value = request.POST["current_value"] + try: + # students =ExtraInfo.objects.all().filter(user_type = "student") + faculty = ( + ExtraInfo.objects.select_related("user", "department") + .all() + .filter(user_type="faculty") + ) + facultyNames = [] + for lecturer in faculty: + name = lecturer.user.first_name + " " + lecturer.user.last_name + if current_value != "": + Lowname = name.lower() + Lowcurrent_value = current_value.lower() + if Lowcurrent_value in Lowname: + facultyNames.append(name) + else: + facultyNames.append(name) + faculty = json.dumps(facultyNames) + return HttpResponse(faculty) + except Exception as e: + return HttpResponse("error") def studentsData(request): - """ - studentsData: - this function is used to return the students data from the ExtraInfo of the requested value - @param: - request - trivial - @variables: - students- contains the Extrainfo of the faculty for the required current value - - """ - current_value = request.POST['current_value'] - try: - # students = ExtraInfo.objects.all().filter(user_type="student").filter(id__startswith=current_value) - students = ExtraInfo.objects.select_related('user','department').all().filter(user_type="student").filter(id__startswith=current_value) - students = serializers.serialize('json', students) - return HttpResponse(students) - except Exception as e: - return HttpResponse("error") + """ + studentsData: + this function is used to return the students data from the ExtraInfo of the requested value + @param: + request - trivial + @variables: + students- contains the Extrainfo of the faculty for the required current value + + """ + current_value = request.POST["current_value"] + try: + # students = ExtraInfo.objects.all().filter(user_type="student").filter(id__startswith=current_value) + students = ( + ExtraInfo.objects.select_related("user", "department") + .all() + .filter(user_type="student") + .filter(id__startswith=current_value) + ) + students = serializers.serialize("json", students) + return HttpResponse(students) + except Exception as e: + return HttpResponse("error") @login_required def new_club(request): - """ - new_club: - this function is used to create a new club with the given data and to check whether - the given info of the co_ordinator , co-coordinator and faculty is true or not from the Student_info and Extra_info , - And if the data is true then dump the json content or else return the error that these data doesn't exit - - @param: - request - trivial - @variables: - club_name - contains the club_name from the request - category - contains the category to which the club belongs - co_ordinator - contains the id of the new_club's co_ordinator - co_coordinator - contains the id of the new_club's co_coordinator - faculty - contains the details of the faculty for the new_club - d_d = contains the descriptons of the - """ - if request.method == 'POST': - result = None - message = None - try: - club_name = request.POST.get("club_name") - category = request.POST.get("category") - print(category) - co_ordinator = request.POST.get("co") - co_coordinator = request.POST.get("coco") - faculty = request.POST.get("faculty") - print("faculty",faculty) - # club_file = request.FILES.get("file") - d_d = request.POST.get("d_d") - - result = "error" - message = "" - co_ordinator = co_ordinator.strip() - co_coordinator = co_coordinator.strip() - faculty = faculty.strip() - #checking if the form data is authentic - #checking for coordinator field - students = ExtraInfo.objects.select_related('user','department').all().filter(user_type = "student") - CO = None - for student_info in students: - if co_ordinator == student_info.id: - result = "success" - CO = student_info - break - print("result",result) - if (result == "error"): - message = message + "The entered roll number of the co_ordinator does not exist" - content = { - 'status' : result, - 'message' : message - } - content = json.dumps(content) - return HttpResponse(content) - - #checking for co-coordinator field - COCO = None - result = "error" - for student_info in students: - if co_coordinator == student_info.id: - result = "success" - COCO = student_info - break - print("cocoordinator",result) - if(result == "error"): - message = message + "The entered roll number of the co_coordinator does not exist" - content = { - 'status' : result, - 'message' : message - } - content = json.dumps(content) - return HttpResponse(content) - - #checking for faculty field - FACUL = None - faculties = ExtraInfo.objects.select_related('user','department').all().filter(user_type = "faculty") - result = "error" - for lecturer in faculties: - checkName = lecturer.user.first_name + " " + lecturer.user.last_name - # print() - if faculty == checkName: - result = "success" - FACUL = lecturer - break - print("faculty",result) - print(CO,COCO) - if (result == "error"): - message = message + "The entered faculty incharge does not exist" - content = { - 'status' : result, - 'message' : message - } - content = json.dumps(content) - return HttpResponse(content) - #getting queryset class objects - co_student = get_object_or_404(Student, id = CO) - print(co_student) - #getting queryset class objects - coco_student = get_object_or_404(Student, id = COCO) - print(coco_student) - #getting queryset class objects - # faculty = faculty.split(" - ") - # user_name = get_object_or_404(User, username = faculty[1]) - # faculty = get_object_or_404(ExtraInfo, id = faculty[0], user = user_name) - faculty_inc = get_object_or_404(Faculty, id = FACUL) - print(faculty_inc) - # club_file.name = club_name+"_club_file" - - club_info = Club_info(club_name = club_name, category = category, co_ordinator = co_student, co_coordinator = coco_student, faculty_incharge = faculty_inc, description = d_d) - print(club_info) - club_info.save() - print("saved successfully") - message = message + "The form has been successfully dispatched for further process" - except Exception as e: - result = "error" - message = "Some error occurred" - - content = { - 'status' : result, - 'message' : message - } - content = json.dumps(content) - HttpResponse(content) - return redirect('/gymkhana/') - + """ + new_club: + this function is used to create a new club with the given data and to check whether + the given info of the co_ordinator , co-coordinator and faculty is true or not from the Student_info and Extra_info , + And if the data is true then dump the json content or else return the error that these data doesn't exit + + @param: + request - trivial + @variables: + club_name - contains the club_name from the request + category - contains the category to which the club belongs + co_ordinator - contains the id of the new_club's co_ordinator + co_coordinator - contains the id of the new_club's co_coordinator + faculty - contains the details of the faculty for the new_club + d_d = contains the descriptons of the + """ + if request.method == "POST": + result = None + message = None + try: + club_name = request.POST.get("club_name") + category = request.POST.get("category") + print(category) + co_ordinator = request.POST.get("co") + co_coordinator = request.POST.get("coco") + faculty = request.POST.get("faculty") + print("faculty", faculty) + # club_file = request.FILES.get("file") + d_d = request.POST.get("d_d") + + result = "error" + message = "" + co_ordinator = co_ordinator.strip() + co_coordinator = co_coordinator.strip() + faculty = faculty.strip() + # checking if the form data is authentic + # checking for coordinator field + students = ( + ExtraInfo.objects.select_related("user", "department") + .all() + .filter(user_type="student") + ) + CO = None + for student_info in students: + if co_ordinator == student_info.id: + result = "success" + CO = student_info + break + print("result", result) + if result == "error": + message = ( + message + + "The entered roll number of the co_ordinator does not exist" + ) + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + + # checking for co-coordinator field + COCO = None + result = "error" + for student_info in students: + if co_coordinator == student_info.id: + result = "success" + COCO = student_info + break + print("cocoordinator", result) + if result == "error": + message = ( + message + + "The entered roll number of the co_coordinator does not exist" + ) + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + + # checking for faculty field + FACUL = None + faculties = ( + ExtraInfo.objects.select_related("user", "department") + .all() + .filter(user_type="faculty") + ) + result = "error" + for lecturer in faculties: + checkName = lecturer.user.first_name + " " + lecturer.user.last_name + # print() + if faculty == checkName: + result = "success" + FACUL = lecturer + break + print("faculty", result) + print(CO, COCO) + if result == "error": + message = message + "The entered faculty incharge does not exist" + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + # getting queryset class objects + co_student = get_object_or_404(Student, id=CO) + print(co_student) + # getting queryset class objects + coco_student = get_object_or_404(Student, id=COCO) + print(coco_student) + # getting queryset class objects + # faculty = faculty.split(" - ") + # user_name = get_object_or_404(User, username = faculty[1]) + # faculty = get_object_or_404(ExtraInfo, id = faculty[0], user = user_name) + faculty_inc = get_object_or_404(Faculty, id=FACUL) + print(faculty_inc) + # club_file.name = club_name+"_club_file" + + club_info = Club_info( + club_name=club_name, + category=category, + co_ordinator=co_student, + co_coordinator=coco_student, + faculty_incharge=faculty_inc, + description=d_d, + status="open", + ) + print(club_info) + club_info.save() + print("saved successfully") + message = ( + message + + "The form has been successfully dispatched for further process" + ) + except Exception as e: + result = "error" + message = "Some error occurred" + + content = {"status": result, "message": message} + content = json.dumps(content) + HttpResponse(content) + return redirect("/gymkhana/") @login_required() def form_avail(request): - """ - form_avail: - this function is used to fill the form if available and then save the data - if there is an exception return an error - - @param: - request - trivial - @variables: - form_name - it is used to send the data for the registration - status - it is availablity of form - """ - if request.method == 'POST': - result = "success" - message = "Form available?" - try: - #getting form data - form_name = request.POST["registration"] - status = request.POST["available"] - - if(status == "On"): - status = True - else: - status = False - roll = request.user.username - rev = Form_available.objects.get(roll=roll).form_name - if rev != form_name: - delete_requests(request) - #saving data to the database - rob = Form_available.objects.get(roll=roll) - rob.form_name = form_name - rob.status = status - rob.save() - - except Exception as e: - logger.info(e) - result = "error" - message = "You've already filled the form." - - content = { - 'status': result, - 'message': message, - } - content = json.dumps(content) - # messages.success(request, "Form available?") - return HttpResponse(content) - # redirect("/gymkhana/") + """ + form_avail: + this function is used to fill the form if available and then save the data + if there is an exception return an error + + @param: + request - trivial + @variables: + form_name - it is used to send the data for the registration + status - it is availablity of form + """ + if request.method == "POST": + result = "success" + message = "Form available?" + try: + # getting form data + form_name = request.POST["registration"] + status = request.POST["available"] + + if status == "On": + status = True + else: + status = False + roll = request.user.username + rev = Form_available.objects.get(roll=roll).form_name + if rev != form_name: + delete_requests(request) + # saving data to the database + rob = Form_available.objects.get(roll=roll) + rob.form_name = form_name + rob.status = status + rob.save() + + except Exception as e: + logger.info(e) + result = "error" + message = "You've already filled the form." + + content = { + "status": result, + "message": message, + } + content = json.dumps(content) + # messages.success(request, "Form available?") + return HttpResponse(content) + # redirect("/gymkhana/") + @login_required def delete_requests(request): - """ - delete_requests: - This view deletes all objects in Registration_form table - if it runs without exception then it deletes and return the result : success - if not then it just returns the result : error in json object - Only this can be when the method is POST - @param: - request : trivial - @variables: - register_objects : all objects of records in Registration_form - """ - if request.method == 'POST': - result = "success" - message = "Data is Deleted." - try: - register_objects = Registration_form.objects.all() - register_objects.delete() - - except Exception as e: - result = "error" - message = "Some error occured." - content = { - 'status': result, - 'message': message, - } - content = json.dumps(content) - return HttpResponse(content) + """ + delete_requests: + This view deletes all objects in Registration_form table + if it runs without exception then it deletes and return the result : success + if not then it just returns the result : error in json object + Only this can be when the method is POST + @param: + request : trivial + @variables: + register_objects : all objects of records in Registration_form + """ + if request.method == "POST": + result = "success" + message = "Data is Deleted." + try: + register_objects = Registration_form.objects.all() + register_objects.delete() + + except Exception as e: + result = "error" + message = "Some error occured." + content = { + "status": result, + "message": message, + } + content = json.dumps(content) + return HttpResponse(content) @login_required() def registration_form(request): - """ - registration_form - This view recieves the data from Front-end side and saves into the Registration_form database - if it runs without exception then it deletes and return the result : success - if not then it just returns the result : error in json object - Only this can be when the method is POST - @params: - request : trivial - @variables: - user_name : name of the user - roll : Roll number of student - cpi : cpi of the student - branch : branch name of the student - programme : Programme of the student - """ - if request.method == 'POST': - result = "success" - message = "The form has been dispatched for further process" - try: - #getting form data - info = Student.objects.select_related('id','id__user','id__department').get(id__user=request.user).cpi - user_name = request.POST.get("user_name") - roll = request.POST.get("roll") - cpi = request.POST.get("cpi") - branch = request.POST.get("branch") - programme = request.POST.get("programme") - - #saving data to the database - register = Registration_form(user_name=user_name, branch=branch, roll=roll, cpi=cpi, programme=programme) - register.save() - # club_member = Club_member(member = student, club = club_name, description = pda) - # club_member.save() - except Exception as e: - logger.info(f"{e}DSANKJDVBJBDAKSCBASKFBasjcbaskjvbaskvaslvbna") - result = "error" - message = "You've already filled the form." - - content = { - 'status':result, - 'message':message - } - content = json.dumps(content) - return HttpResponse(content) - # messages.success(request,"Successfully sent the application !!!") - - # return redirect('/gymkhana/') - -def retrun_content(request, roll, name, desig , club__ ): - """ - retrun_content - This view returns all data regarding the parameters that sent through function - The returned data contains all information regarding all clubs , polling system , status of clubs , - students info who are in the designation, which was sent through parameters of this function - @param: - request : trivial - roll : Roll number of the student - name : name of the user - desig : Designition of the user - club__ : club name of the user - @variables: - student : All info of the student passes through the function - faculty : All info of the faculty - club_name : All club names - club_member : All info of the Club_member - fest_budget : All info of the fest_budget - club_budget : All info of the Club_budget - club_session : All info of the Session_info - club_event : All info of the Event_info - club_event_report : All info of the Club_report - - """ - students =ExtraInfo.objects.select_related('user','department').filter(user_type = "student") - faculty = ExtraInfo.objects.select_related('user','department').filter(user_type = "faculty") - club_name = Club_info.objects.select_related('co_ordinator','co_ordinator__id','co_ordinator__id__user','co_ordinator__id__department','co_coordinator','co_coordinator__id','co_coordinator__id__user','co_coordinator__id__department','faculty_incharge','faculty_incharge__id','faculty_incharge__id__user','faculty_incharge__id__department').all() - club_member = Club_member.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department','member','member__id','member__id__user','member__id__department').all() - fest_budget = Fest_budget.objects.all() - club_budget = Club_budget.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').all() - club_session = Session_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').all() - club_event = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').all() - club_event_report = Club_report.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department','incharge','incharge__user','incharge__department').all() - if 'student' in desig or 'Convenor' in desig: - registration_form = Registration_form.objects.all() - cpi = Student.objects.select_related('id','id__user','id__department').get(id__user=request.user).cpi - programme = Student.objects.select_related('id','id__user','id__department').get(id__user=request.user).programme - - try: - form_name = Form_available.objects.get(roll=request.user.username).form_name - logger.info(f'{form_name} MKNCjncknisncs') - status = Form_available.objects.get(roll=request.user.username).status - except Exception as e: - forms = Form_available.objects.all() - for form in forms: - form_name = form.form_name - status = form.status - break - - venue_type = [] - id =0 - venue = [] - - - for rooms in Constants.venue: - for room in rooms[1]: - venue.append(room[0]) - curr_club=[] - if 'student' in desig: - try : - user_name = get_object_or_404(User, username = str(roll)) - extra = get_object_or_404(ExtraInfo, id = roll, user = user_name) - student = get_object_or_404(Student, id = extra) - except : - curr_club = [] - else : - curr_club = [] - - # creating the data for the active voting polls - voting_polls = [] - for poll in Voting_polls.objects.all(): - event = {} - choices = [] - event["id"] = poll.id - event["title"] = poll.title - event["desc"] = poll.description - event['exp_date'] = (poll.exp_date- datetime.datetime.now()).days if (datetime.datetime.now() - poll.exp_date).days <= 0 else 'expire' - event['pub_date'] = poll.exp_date.strftime("%d/%m/%Y") - event["created_by"] = poll.created_by.split(":") - for choice in poll.voting_choices_set.all(): - choices.append({'title':choice.title,'id':choice.id,'votes':choice.votes}) - - event['choices'] = choices - event['max'] = poll.voting_choices_set.latest() - event['voters'] = poll.voting_voters_set.values_list('student_id', flat=True) - event['groups'] = json.loads(poll.groups) - - voting_polls.append(event) - - content = { - 'Students' : students, - 'Club_name' : club_name, - 'Faculty' : faculty, - 'Club_member' : club_member, - 'Fest_budget' : fest_budget, - 'Club_budget' : club_budget, - 'Club_session': club_session, - 'Club_event' : club_event, - 'Club_event_report' : club_event_report, - 'Curr_club' : curr_club, - 'venue' : venue, - 'Curr_desig' : desig, - 'club_details':club__, - 'voting_polls': voting_polls, - 'roll' : str(roll), - - } - if 'student' in desig or 'Convenor' in desig: - content1 = { - 'registration_form': registration_form, - 'cpi': cpi, - 'programme': programme, - 'form_name': form_name, - 'status': status, - } - content.update(content1) - return content + """ + registration_form + This view recieves the data from Front-end side and saves into the Registration_form database + if it runs without exception then it deletes and return the result : success + if not then it just returns the result : error in json object + Only this can be when the method is POST + @params: + request : trivial + @variables: + user_name : name of the user + roll : Roll number of student + cpi : cpi of the student + branch : branch name of the student + programme : Programme of the student + """ + if request.method == "POST": + result = "success" + message = "The form has been dispatched for further process" + try: + # getting form data + info = ( + Student.objects.select_related("id", "id__user", "id__department") + .get(id__user=request.user) + .cpi + ) + user_name = request.POST.get("user_name") + roll = request.POST.get("roll") + cpi = request.POST.get("cpi") + branch = request.POST.get("branch") + programme = request.POST.get("programme") + + # saving data to the database + register = Registration_form( + user_name=user_name, + branch=branch, + roll=roll, + cpi=cpi, + programme=programme, + ) + register.save() + # club_member = Club_member(member = student, club = club_name, description = pda) + # club_member.save() + except Exception as e: + logger.info(f"{e}DSANKJDVBJBDAKSCBASKFBasjcbaskjvbaskvaslvbna") + result = "error" + message = "You've already filled the form." + + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + # messages.success(request,"Successfully sent the application !!!") + + # return redirect('/gymkhana/') + + +def return_content(request, roll, name, desig, club__): + """ + return_content + This view returns all data regarding the parameters that sent through function + The returned data contains all information regarding all clubs , polling system , status of clubs , + students info who are in the designation, which was sent through parameters of this function + @param: + request : trivial + roll : Roll number of the student + name : name of the user + desig : Designition of the user + club__ : club name of the user + @variables: + student : All info of the student passes through the function + faculty : All info of the faculty + club_name : All club names + club_member : All info of the Club_member + fest_budget : All info of the fest_budget + club_budget : All info of the Club_budget + club_session : All info of the Session_info + club_event : All info of the Event_info + club_event_report : All info of the Club_report + + """ + students = ExtraInfo.objects.select_related("user", "department").filter( + user_type="student" + ) + faculty = ExtraInfo.objects.select_related("user", "department").filter( + user_type="faculty" + ) + club_name = Club_info.objects.select_related( + "co_ordinator", + "co_ordinator__id", + "co_ordinator__id__user", + "co_ordinator__id__department", + "co_coordinator", + "co_coordinator__id", + "co_coordinator__id__user", + "co_coordinator__id__department", + "faculty_incharge", + "faculty_incharge__id", + "faculty_incharge__id__user", + "faculty_incharge__id__department", + ).all() + club_member = Club_member.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + "member", + "member__id", + "member__id__user", + "member__id__department", + ).all() + fest_budget = Fest_budget.objects.all() + club_budget = Club_budget.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).all() + club_session = Session_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).all() + club_event = Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).all() + club_event_report = Club_report.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + "incharge", + "incharge__user", + "incharge__department", + ).all() + if "student" in desig or "Convenor" in desig: + registration_form = Registration_form.objects.all() + cpi = ( + Student.objects.select_related("id", "id__user", "id__department") + .get(id__user=request.user) + .cpi + ) + programme = ( + Student.objects.select_related("id", "id__user", "id__department") + .get(id__user=request.user) + .programme + ) + + try: + form_name = Form_available.objects.get(roll=request.user.username).form_name + logger.info(f"{form_name} MKNCjncknisncs") + status = Form_available.objects.get(roll=request.user.username).status + except Exception as e: + forms = Form_available.objects.all() + for form in forms: + form_name = form.form_name + status = form.status + break + + venue_type = [] + id = 0 + venue = [] + + for rooms in Constants.venue: + for room in rooms[1]: + venue.append(room[0]) + curr_club = [] + if "student" in desig: + user_name = get_object_or_404(User, username=str(roll)) + extra = get_object_or_404(ExtraInfo, id=roll, user=user_name) + student = get_object_or_404(Student, id=extra) + else: + curr_club = [] + + # creating the data for the active voting polls + voting_polls = [] + for poll in Voting_polls.objects.all(): + event = {} + choices = [] + event["id"] = poll.id + event["title"] = poll.title + event["desc"] = poll.description + event["exp_date"] = ( + (poll.exp_date - datetime.datetime.now()).days + if (datetime.datetime.now() - poll.exp_date).days <= 0 + else "expire" + ) + event["pub_date"] = poll.exp_date.strftime("%d/%m/%Y") + event["created_by"] = poll.created_by.split(":") + for choice in poll.voting_choices_set.all(): + choices.append( + {"title": choice.title, "id": choice.id, "votes": choice.votes} + ) + + event["choices"] = choices + event["max"] = poll.voting_choices_set.latest() + event["voters"] = poll.voting_voters_set.values_list("student_id", flat=True) + event["groups"] = json.loads(poll.groups) + + voting_polls.append(event) + + content = { + "Students": students, + "Club_name": club_name, + "Faculty": faculty, + "Club_member": club_member, + "Fest_budget": fest_budget, + "Club_budget": club_budget, + "Club_session": club_session, + "Club_event": club_event, + "Club_event_report": club_event_report, + "Curr_club": curr_club, + "venue": venue, + "Curr_desig": desig, + "club_details": club__, + "voting_polls": voting_polls, + "roll": str(roll), + } + # print(club__) + if "student" in desig or "Convenor" in desig: + content1 = { + "registration_form": registration_form, + "cpi": cpi, + "programme": programme, + "form_name": form_name, + "status": status, + } + content.update(content1) + return content + @login_required def getVenue(request): - """ - getVenue - This view takes the venue type from Front-end and returns the list of venues which of type - provided by User - @param: - request : trivial - @variables: - selected : Type of the venue selected by the user - """ - selected = request.POST.get('venueType') - selected = selected.strip() - venue_type = [] - venue_details = {} - idd = 0 - for rooms in Constants.venue: - for room in rooms: - if(idd % 2 == 0): - venue_type.append(room) - else: - venue_list = [venue[0] for venue in room] - venue_details[venue_type[int(idd/2)]] = venue_list - idd = idd+1 - content = [] - for key, value in venue_details.items(): - if key == selected: - for val in value: - val = val.strip() - content.append(val) - content = json.dumps(content) - return HttpResponse(content) + """ + getVenue + This view takes the venue type from Front-end and returns the list of venues which of type + provided by User + @param: + request : trivial + @variables: + selected : Type of the venue selected by the user + """ + selected = request.POST.get("venueType") + selected = selected.strip() + venue_type = [] + venue_details = {} + idd = 0 + for rooms in Constants.venue: + for room in rooms: + if idd % 2 == 0: + venue_type.append(room) + else: + venue_list = [venue[0] for venue in room] + venue_details[venue_type[int(idd / 2)]] = venue_list + idd = idd + 1 + content = [] + for key, value in venue_details.items(): + if key == selected: + for val in value: + val = val.strip() + content.append(val) + content = json.dumps(content) + return HttpResponse(content) + @login_required def gymkhana(request): - """ - gymkhana - This view gives us the complete information regarding various clubs and it - contains the records of the coordinator and co-coordinator of all the clubs and users can join any - club and cancel his/her membership from any club that he/she wishes to. And it also contains the - details of the sessions and events conducted by various clubs and club heads can also conduct - surveys by conducting polls and by taking the permission from the academic office students can - also create the clubs for a purpose. - @param: - request : trivial - @variables: - roll : Roll number of the User - name : full name of the user - designations : List contains all info of the user logged in - - """ - roll = request.user - name = request.user.first_name +"_"+ request.user.last_name - designations = list(HoldsDesignation.objects.select_related('user','working','designation').all().filter(working = request.user).values_list('designation')) - designation_data = [element for designation in designations for element in designation] - roll_ = [] - for designation in designation_data : - try: - name_ = get_object_or_404(Designation, id = designation) - roll_.append(str(name_.name)) - except: - pass - for club_data in Club_info.objects.select_related('co_ordinator','co_ordinator__id','co_ordinator__id__user','co_ordinator__id__department','co_coordinator','co_coordinator__id','co_coordinator__id__user','co_coordinator__id__department','faculty_incharge','faculty_incharge__id','faculty_incharge__id__user','faculty_incharge__id__department').all(): - lines =str("") - Types = lines.split(" ") - club__ = coordinator_club(request) - return render(request, "gymkhanaModule/gymkhana.html", retrun_content(request, roll, name, roll_ , club__ )) + """ + gymkhana + This view gives us the complete information regarding various clubs and it + contains the records of the coordinator and co-coordinator of all the clubs and users can join any + club and cancel his/her membership from any club that he/she wishes to. And it also contains the + details of the sessions and events conducted by various clubs and club heads can also conduct + surveys by conducting polls and by taking the permission from the academic office students can + also create the clubs for a purpose. + @param: + request : trivial + @variables: + roll : Roll number of the User + name : full name of the user + designations : List contains all info of the user logged in + + """ + roll = request.user + name = request.user.first_name + "_" + request.user.last_name + designations = list( + HoldsDesignation.objects.select_related("user", "working", "designation") + .all() + .filter(working=request.user) + .values_list("designation") + ) + designation_data = [ + element for designation in designations for element in designation + ] + roll_ = [] + for designation in designation_data: + name_ = get_object_or_404(Designation, id=designation) + # # # print name_ + roll_.append(str(name_.name)) + for club_data in Club_info.objects.select_related( + "co_ordinator", + "co_ordinator__id", + "co_ordinator__id__user", + "co_ordinator__id__department", + "co_coordinator", + "co_coordinator__id", + "co_coordinator__id__user", + "co_coordinator__id__department", + "faculty_incharge", + "faculty_incharge__id", + "faculty_incharge__id__user", + "faculty_incharge__id__department", + ).all(): + lines = str("") + Types = lines.split(" ") + club__ = coordinator_club(request) + print(club__) + return render( + request, + "gymkhanaModule/gymkhana.html", + return_content(request, roll, name, roll_, club__), + ) + @login_required def club_membership(request): - """ - club_membership: - This view takes the user_name, club name, achievements of that student and saves it to - club_memder database. Finally displays success if there are no Exceptions and errors and if there - is some Exception, then by using json.dump() which converts python objects to json string. - @param: - request : trivial - @variables: - user_name : Name of the user - club : Name of the club - achievements : Achievements of the user - """ - if request.method == 'POST': - result = "success" - message = "The form has been dispatched for further process" - try: - # getting form data - user_name = request.POST.get("user_name") - club = request.POST.get("club") - achievements = request.POST.get("achievements") - - # getting queryset class objects - #user_name = User.objects.get(username = user[-7:]) - USER = user_name.split(' - ') - user_name = get_object_or_404(User, username=USER[1]) - extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) - student = get_object_or_404(Student, id=extra) - #extra = ExtraInfo.objects.get(id = user[:-10], user = user_name) - #student = Student.objects.get(id = extra) - - club_name = get_object_or_404(Club_info, club_name=club) - - # saving data to the database - club_member = Club_member( - member=student, club=club_name, description=achievements) - club_member.save() - except Exception as e: - result = "error" - message = "Some error occurred" - - content = { - 'status': result, - 'message': message - } - content = json.dumps(content) - return HttpResponse(content) - # messages.success(request,"Successfully sent the application !!!") - - # return redirect('/gymkhana/') + """ + club_membership: + This view takes the user_name, club name, achievements of that student and saves it to + club_memder database. Finally displays success if there are no Exceptions and errors and if there + is some Exception, then by using json.dump() which converts python objects to json string. + @param: + request : trivial + @variables: + user_name : Name of the user + club : Name of the club + achievements : Achievements of the user + """ + if request.method == "POST": + result = "success" + message = "The form has been dispatched for further process" + try: + # getting form data + user_name = request.POST.get("user_name") + club = request.POST.get("club") + achievements = request.POST.get("achievements") + + # getting queryset class objects + # user_name = User.objects.get(username = user[-7:]) + USER = user_name.split(" - ") + user_name = get_object_or_404(User, username=USER[1]) + extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) + student = get_object_or_404(Student, id=extra) + # extra = ExtraInfo.objects.get(id = user[:-10], user = user_name) + # student = Student.objects.get(id = extra) + + club_name = get_object_or_404(Club_info, club_name=club) + + # saving data to the database + club_member = Club_member( + member=student, club=club_name, description=achievements + ) + club_member.save() + except Exception as e: + result = "error" + message = "Some error occurred" + + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + # messages.success(request,"Successfully sent the application !!!") + + # return redirect('/gymkhana/') @login_required def core_team(request): - """ - core_team: - This view takes the data of students. Data like, their name, fest name, team, pda and - year. And finally saving this data to the database of the core team. - This will done only when the method is POST and at the end it will redirect to '/gymkhana/' - @params: - request : trivial - @variables: - user : Name of the user - fest : Name of the fest - team : Name of the team - achievements : Achievements of the user - year : Acedamic year of the core team - - """ - if request.method == 'POST': - # getting form data - user = request.POST.get("user_name") - fest = request.POST.get("fest") - team = request.POST.get("team") - achievements = request.POST.get("pda") - year = request.POST.get("year") - - # getting queryset class objects - USER = user.split(' - ') - user_name = get_object_or_404(User, username=USER[1]) - extra = get_object_or_404(ExtraInfo, id=USER[00], user=user_name) - student = get_object_or_404(Student, id=extra) - - # saving data to the database - core_team = Core_team(student_id=student, - fest_name=fest, team=team, pda=achievements, year=year) - core_team.save() - messages.success(request, "Successfully applied for the post !!!") - - return redirect('/gymkhana/') + """ + core_team: + This view takes the data of students. Data like, their name, fest name, team, pda and + year. And finally saving this data to the database of the core team. + This will done only when the method is POST and at the end it will redirect to '/gymkhana/' + @params: + request : trivial + @variables: + user : Name of the user + fest : Name of the fest + team : Name of the team + achievements : Achievements of the user + year : Acedamic year of the core team + + """ + if request.method == "POST": + # getting form data + user = request.POST.get("user_name") + fest = request.POST.get("fest") + team = request.POST.get("team") + achievements = request.POST.get("pda") + year = request.POST.get("year") + + # getting queryset class objects + USER = user.split(" - ") + user_name = get_object_or_404(User, username=USER[1]) + extra = get_object_or_404(ExtraInfo, id=USER[00], user=user_name) + student = get_object_or_404(Student, id=extra) + + # saving data to the database + core_team = Core_team( + student_id=student, fest_name=fest, team=team, pda=achievements, year=year + ) + core_team.save() + messages.success(request, "Successfully applied for the post !!!") + + return redirect("/gymkhana/") + @login_required def event_report(request): - """ - event_report: - This view takes mainly the event, date, time, report and description of that - certain event. And then it appends that particular event`s report to other_report and - saves it to the database. Finally it redirects to the gymkhana homepage. - @param: - request : trivial - @variables: - user : Name of the user - event : Name of the event - description : Event`s description - date : Date of the event - time : Time of the event schedule - report : This is a file of details of the event - - """ - if request.method == 'POST': - # getting form data - user = request.POST.get("st_inc") - event = request.POST.get("event") - description = request.POST.get("d_d") - date = request.POST.get("date") - time = request.POST.get("time") - report = request.FILES["report"] - report.name = event+"_report" - - # getting queryset class objects - USER = user.split(' - ') - user_name = get_object_or_404(User, username=USER[1]) - extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) - - # saving data to the database - other_report = Other_report(incharge=extra, event_name=event, - date=date+" "+time, event_details=report, description=description) - other_report.save() - messages.success(request, "Successfully saved the report !!!") - - return redirect('/gymkhana/') + """ + event_report: + This view takes mainly the event, date, time, report and description of that + certain event. And then it appends that particular event`s report to other_report and + saves it to the database. Finally it redirects to the gymkhana homepage. + @param: + request : trivial + @variables: + user : Name of the user + event : Name of the event + description : Event`s description + date : Date of the event + time : Time of the event schedule + report : This is a file of details of the event + + """ + if request.method == "POST": + # getting form data + user = request.POST.get("st_inc") + event = request.POST.get("event") + description = request.POST.get("d_d") + date = request.POST.get("date") + time = request.POST.get("time") + report = request.FILES["report"] + report.name = event + "_report" + + # getting queryset class objects + USER = user.split(" - ") + user_name = get_object_or_404(User, username=USER[1]) + extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) + + # saving data to the database + other_report = Other_report( + incharge=extra, + event_name=event, + date=date + " " + time, + event_details=report, + description=description, + ) + other_report.save() + messages.success(request, "Successfully saved the report !!!") + + return redirect("/gymkhana/") @login_required def club_budget(request): - """ - club_budget: - This view takes details of club name, reason for the event and the amount - required for the event of the club.if the club name doesn't match with the clubs in database it - shows errors,else it the uploads to database and a message displays successfully uploaded the - budget.And then it redirects to gymkhana homepage. - @param: - request : trivial - @variables: - club : Name of the club - budget_for : Reason for the budget - budget_amount : Amount of the budget - budget_file : File that contains the budget details - description : Brief note of the whole budget view. - - - """ - if request.method == 'POST' and request.FILES['budget_file']: - club = request.POST.get("club") - budget_for = request.POST.get("budget_for") - budget_amount = request.POST.get('amount') - budget_file = request.FILES['budget_file'] - description = request.POST.get('d_d') - budget_file.name = club+"_budget" - club_name = get_object_or_404(Club_info, club_name=club) - - club_budget = Club_budget(club=club_name, budget_amt=budget_amount, - budget_file=budget_file, budget_for=budget_for, description=description) - club_budget.save() - messages.success(request, "Successfully requested for the budget !!!") - - return redirect('/gymkhana/') + """ + club_budget: + This view takes details of club name, reason for the event and the amount + required for the event of the club.if the club name doesn't match with the clubs in database it + shows errors,else it the uploads to database and a message displays successfully uploaded the + budget.And then it redirects to gymkhana homepage. + @param: + request : trivial + @variables: + club : Name of the club + budget_for : Reason for the budget + budget_amount : Amount of the budget + budget_file : File that contains the budget details + description : Brief note of the whole budget view. + + + """ + print("function called") + if request.method == "POST" and request.FILES["budget_file"]: + club = request.POST.get("club") + budget_for = request.POST.get("budget_for") + budget_amount = request.POST.get("amount") + budget_file = request.FILES["budget_file"] + description = request.POST.get("d_d") + budget_file.name = club + "_budget" + club_name = get_object_or_404(Club_info, club_name=club) + + club_budget = Club_budget( + club_id=club_name, + budget_amt=budget_amount, + budget_file=budget_file, + budget_for=budget_for, + description=description, + status="open", + ) + club_budget.save() + messages.success(request, "Successfully requested for the budget !!!") + + return redirect("/gymkhana/") @login_required def act_calender(request): - """ - act_calender: - This view gets the date from the club if there is any wrong info it shows the error - otherwise it shows Successfully uploaded the calendar in the form of Json object - and adds to the calendar - @params: - request : trivial - @variables: - club : Name of the club - act_calender : File that contains the active calender of the club - """ - if request.method == "POST": - message = "" - club = request.POST.get("club") - act_calender = request.FILES['act_file'] - act_calender.name = club+"_act_calender.pdf" - - #club_name = get_object_or_404(Club_info, club_name = club) - - club_info = get_object_or_404(Club_info, club_name=club) - club_info.activity_calender = act_calender - club_info.save() - message += "Successfully uploaded the calender !!!" - - content = { - 'status':"success", - 'message':message, - } - content = json.dumps(content) - return HttpResponse(content) - - + """ + act_calender: + This view gets the date from the club if there is any wrong info it shows the error + otherwise it shows Successfully uploaded the calendar in the form of Json object + and adds to the calendar + @params: + request : trivial + @variables: + club : Name of the club + act_calender : File that contains the active calender of the club + """ + if request.method == "POST": + message = "" + club = request.POST.get("club") + act_calender = request.FILES["act_file"] + act_calender.name = club + "_act_calender.pdf" + + # club_name = get_object_or_404(Club_info, club_name = club) + + club_info = get_object_or_404(Club_info, club_name=club) + club_info.activity_calender = act_calender + club_info.save() + message += "Successfully uploaded the calender !!!" + + content = { + "status": "success", + "message": message, + } + content = json.dumps(content) + return HttpResponse(content) @login_required def club_report(request): - """ - This function is used to add the details of the club event along with a report. - It adds the club event details to the database. - And also uploads report file. + """ + This function is used to add the details of the club event along with a report. + It adds the club event details to the database. + And also uploads report file. + + @param: + request - trivial + + @variable: + club - name of the club + user - the id of user who adds this club event details + event - name of the event + d_d - description of the event + date - date in which the event going to happen/happened + time - time in which the event going to happen/happened + report - the club_report file on the event uploads by the user who adds data + + """ + if request.method == "POST" and request.FILES["report"]: + # getting form data + club = request.POST.get("club") + user = request.POST.get("s_inc") + event = request.POST.get("event") + d_d = request.POST.get("d_d") + date = request.POST.get("date") + time = request.POST.get("time") + report = request.FILES["report"] + report.name = club + "_" + event + "_report" + + # getting queryset class objects + USER = user.split(" - ") + user_name = get_object_or_404(User, username=USER[1]) + extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) + + club_name = get_object_or_404(Club_info, club_name=club) + + # saving data to the database + club_report = Club_report( + club=club_name, + incharge=extra, + event_name=event, + date=date + " " + time, + event_details=report, + description=d_d, + ) + club_report.save() + messages.success(request, "Successfully updated the report !!!") + + return redirect("/gymkhana/") - @param: - request - trivial - - @variable: - club - name of the club - user - the id of user who adds this club event details - event - name of the event - d_d - description of the event - date - date in which the event going to happen/happened - time - time in which the event going to happen/happened - report - the club_report file on the event uploads by the user who adds data - - """ - if request.method == 'POST' and request.FILES['report']: - # getting form data - club = request.POST.get('club') - user = request.POST.get("s_inc") - event = request.POST.get("event") - d_d = request.POST.get("d_d") - date = request.POST.get("date") - time = request.POST.get("time") - report = request.FILES["report"] - report.name = club+"_"+event+"_report" - - # getting queryset class objects - USER = user.split(' - ') - user_name = get_object_or_404(User, username=USER[1]) - extra = get_object_or_404(ExtraInfo, id=USER[0], user=user_name) - - club_name = get_object_or_404(Club_info, club_name=club) - - # saving data to the database - club_report = Club_report(club=club_name, incharge=extra, event_name=event, - date=date+" "+time, event_details=report, description=d_d) - club_report.save() - messages.success(request, "Successfully updated the report !!!") - - return redirect('/gymkhana/') @login_required def change_head(request): - """ - This used to change the heads of club. - It gets the old co_ordinator and co_cordinator and replaces them with new co and co_co. - And adds to the database. - - @param: - request - trivial - - @variables: - - club - name of the club - co_ordinator - new co_ordinator of the club - co_coordinator - new co_cordinator of the club - date - date at which the heads of the clubs changes - time - time at which the heads changes - desc - description on change of heads - old_co_ordinator - HoldsDesignation object and after deletes this co_ordinator - old_co_coordinator - HoldsDesignation object and after deletes this co_coordinator - new_co_ordinator - HoldsDesignation object and after saves this object as co_ordinator - new_co_coordinator - HoldsDesignation object and after saves this object as co_coordinator - """ - - if request.method == "POST": - club = request.POST.get("club") - co_ordinator = request.POST.get('co') - co_coordinator = request.POST.get('coco') - date = request.POST.get("date") - time = request.POST.get("time") - desc = "co-ordinator and co co-ordinator changed on "+date+" at "+time - message = "" - - # club_name = get_object_or_404(Club_info, club_name=club) - - co_ordinator_student = get_object_or_404(Student, id__user__username=co_ordinator) + """ + This used to change the heads of club. + It gets the old co_ordinator and co_cordinator and replaces them with new co and co_co. + And adds to the database. - co_coordinator_student = get_object_or_404(Student, id__user__username=co_coordinator) - - club_info = get_object_or_404(Club_info, club_name=club) - - old_co_ordinator = club_info.co_ordinator - old_co_coordinator = club_info.co_coordinator - club_info.co_ordinator = co_ordinator_student - club_info.co_coordinator = co_coordinator_student - club_info.save() - - message += "Successfully changed !!!" - - new_co_ordinator = HoldsDesignation(user=User.objects.get(username=co_ordinator), working=User.objects.get(username=co_ordinator), designation=Designation.objects.get(name="co-ordinator")) - new_co_ordinator.save() - new_co_coordinator = HoldsDesignation(user=User.objects.get(username=co_coordinator), working=User.objects.get(username=co_coordinator), designation=Designation.objects.get(name="co co-ordinator")) - new_co_coordinator.save() - - old_co_ordinator = HoldsDesignation.objects.select_related('user','working','designation').filter(user__username=old_co_ordinator, designation__name="co-ordinator") - old_co_ordinator.delete() - old_co_coordinator = HoldsDesignation.objects.select_related('user','working','designation').filter(user__username=old_co_coordinator, designation__name="co co-ordinator") - old_co_coordinator.delete() - - content = { - 'status':"success", - 'message':message, - } - - content = json.dumps(content) - return HttpResponse(content) - - # return redirect('/gymkhana/') + @param: + request - trivial + @variables: + + club - name of the club + co_ordinator - new co_ordinator of the club + co_coordinator - new co_cordinator of the club + date - date at which the heads of the clubs changes + time - time at which the heads changes + desc - description on change of heads + old_co_ordinator - HoldsDesignation object and after deletes this co_ordinator + old_co_coordinator - HoldsDesignation object and after deletes this co_coordinator + new_co_ordinator - HoldsDesignation object and after saves this object as co_ordinator + new_co_coordinator - HoldsDesignation object and after saves this object as co_coordinator + """ + + if request.method == "POST": + club = request.POST.get("club") + co_ordinator = request.POST.get("co") + co_coordinator = request.POST.get("coco") + + desc = "co-ordinator and co co-ordinator changed on " + str(timezone.now()) + message = "" + + # club_name = get_object_or_404(Club_info, club_name=club) + + co_ordinator_student = get_object_or_404( + Student, id__user__username=co_ordinator + ) + + co_coordinator_student = get_object_or_404( + Student, id__user__username=co_coordinator + ) + + club_info = get_object_or_404(Club_info, club_name=club) + + old_co_ordinator = club_info.co_ordinator + old_co_coordinator = club_info.co_coordinator + club_info.co_ordinator = co_ordinator_student + club_info.co_coordinator = co_coordinator_student + club_info.head_changed_on = timezone.now() + club_info.save() + + message += "Successfully changed !!!" + + new_co_ordinator = HoldsDesignation( + user=User.objects.get(username=co_ordinator), + working=User.objects.get(username=co_ordinator), + designation=Designation.objects.get(name="co-ordinator"), + ) + new_co_ordinator.save() + new_co_coordinator = HoldsDesignation( + user=User.objects.get(username=co_coordinator), + working=User.objects.get(username=co_coordinator), + designation=Designation.objects.get(name="co co-ordinator"), + ) + new_co_coordinator.save() + + old_co_ordinator = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).filter(user__username=old_co_ordinator, designation__name="co-ordinator") + old_co_ordinator.delete() + old_co_coordinator = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).filter(user__username=old_co_coordinator, designation__name="co co-ordinator") + old_co_coordinator.delete() + + content = { + "status": "success", + "message": message, + } + + content = json.dumps(content) + return HttpResponse(content) + + # return redirect('/gymkhana/') @login_required def new_session(request): - """ + """ This function is used to add/create new sessions for clubs by their users. - By using this the club user can add new session. - If the given date and time and venue clasheswith already booked session it doesn't add the session. - And it displays success if there is no exception and displays error if there is an exception. - - @param: - request - trivial - - @variables: - venue - the place/room at which the session is going to happen - session_poster - it is a file that has to be uploaded which contains the poster for session - date - the date at which session is going to happen - start_time - the time at which session is going to start - end_time - the time at which session is going to end - desc - brief explanation about session if any - club_name - requests the coordinator_club and it returns - result - checks wheather the date,time,venue clashes with other session using conflict_algorithm_session view - getstudents - extrainfo object - session - if result is success then the session books successfully - - """ - if request.method == "POST": - club_name = None - result =None - message = None - try: - venue = request.POST.get("venue_type") - session_poster = request.FILES.get("session_poster") - date = request.POST.get("date") - start_time = request.POST.get("start_time") - end_time = request.POST.get("end_time") - desc = request.POST.get("d_d") - club_name = coordinator_club(request) - result = conflict_algorithm_session(date, start_time, end_time, venue) - message = "" - getstudents = ExtraInfo.objects.select_related('user','department').filter(user_type = 'student') - recipients = User.objects.filter(extrainfo__in=getstudents) - if(result == "success"): - session = Session_info(club = club_name, venue = venue, date =date, start_time=start_time , end_time = end_time , session_poster=session_poster, details = desc) - session.save() - message += "Session booked Successfully" - gymkhana_session(request.user, recipients, 'new_session', club_name, desc, venue) - - else: - message += "The selected time slot for the given date and venue conflicts with already booked session" - except Exception as e: - logger.info(e) - result = "error" - message = "Some error occurred" - - content = { - 'status':result, - 'message':message - } - - content = json.dumps(content) - return HttpResponse(content) + By using this the club user can add new session. + If the given date and time and venue clasheswith already booked session it doesn't add the session. + And it displays success if there is no exception and displays error if there is an exception. + + @param: + request - trivial + + @variables: + venue - the place/room at which the session is going to happen + session_poster - it is a file that has to be uploaded which contains the poster for session + date - the date at which session is going to happen + start_time - the time at which session is going to start + end_time - the time at which session is going to end + desc - brief explanation about session if any + club_name - requests the coordinator_club and it returns + result - checks wheather the date,time,venue clashes with other session using conflict_algorithm_session view + getstudents - extrainfo object + session - if result is success then the session books successfully + + """ + if request.method == "POST": + club_name = None + result = None + message = None + try: + venue = request.POST.get("venue_type") + session_poster = request.FILES.get("session_poster") + date = request.POST.get("date") + start_time = request.POST.get("start_time") + end_time = request.POST.get("end_time") + desc = request.POST.get("d_d") + club_name = coordinator_club(request) + result = conflict_algorithm_session(date, start_time, end_time, venue) + message = "" + getstudents = ExtraInfo.objects.select_related("user", "department").filter( + user_type="student" + ) + recipients = User.objects.filter(extrainfo__in=getstudents) + if result == "success": + session = Session_info( + club=club_name, + venue=venue, + date=date, + start_time=start_time, + end_time=end_time, + session_poster=session_poster, + details=desc, + ) + session.save() + message += "Session booked Successfully" + gymkhana_session( + request.user, recipients, "new_session", club_name, desc, venue + ) + + else: + message += "The selected time slot for the given date and venue conflicts with already booked session" + except Exception as e: + logger.info(e) + result = "error" + message = "Some error occurred" + + content = {"status": result, "message": message} + + content = json.dumps(content) + return HttpResponse(content) + @login_required def new_event(request): - """ + """ This function is used to add/create new event by clubs by their users. - By using this the club user can add new event. - If the given date and time and venue clasheswith already booked events/sessions it doesn't move to further process. - And it displays your form has been moved for further process if there is no exception and displays error if there is an exception. - - @param: - request - trivial - - @variables: + By using this the club user can add new event. + If the given date and time and venue clasheswith already booked events/sessions it doesn't move to further process. + And it displays your form has been moved for further process if there is no exception and displays error if there is an exception. + + @param: + request - trivial + + @variables: event_name - we have to give name of the event - incharge - the faculty staff name who is going to incharge the event - venue - the place/room at which the event is going to happen - event_poster - it is a file that has to be uploaded which contains the poster for event - date - the date at which event is going to happen - start_time - the time at which event is going to start - end_time - the time at which event is going to end - desc - brief explanation about event - club_name - requests the coordinator_club and it returns - result - checks wheather the date,time,venue clashes with other event using conflict_algorithm_event view - getstudents - Extrainfo object - session - if result is success then the event has been saved - - """ - if request.method == "POST": - club_name = None - result =None - message = None - try: - event_name=request.POST.get("event_name") - incharge=request.POST.get("incharge") - venue = request.POST.get("venue_type") - event_poster = request.FILES.get("event_poster") - date = request.POST.get("date") - start_time = request.POST.get("start_time") - end_time = request.POST.get("end_time") - desc = request.POST.get("d_d") - club_name = coordinator_club(request) - result = conflict_algorithm_event(date, start_time, end_time, venue) - message = "" - getstudents = ExtraInfo.objects.select_related('user','department').filter(user_type = 'student') - recipients = User.objects.filter(extrainfo__in=getstudents) - if(result == "success"): - event = Event_info(club = club_name, event_name=event_name, incharge=incharge, venue = venue, date =date, start_time=start_time , end_time = end_time ,event_poster = event_poster , details = desc) - event.save() - message += "Your form has been dispatched for further process" - gymkhana_event(request.user, recipients, 'new_event', club_name, event_name, desc, venue) - else: - message += "The selected time slot for the given date and venue conflicts with already booked session" - except Exception as e: - result = "error" - message = "Some error occurred" - - content = { - 'status':result, - 'message':message - } - content = json.dumps(content) - return HttpResponse(content) + incharge - the faculty staff name who is going to incharge the event + venue - the place/room at which the event is going to happen + event_poster - it is a file that has to be uploaded which contains the poster for event + date - the date at which event is going to happen + start_time - the time at which event is going to start + end_time - the time at which event is going to end + desc - brief explanation about event + club_name - requests the coordinator_club and it returns + result - checks wheather the date,time,venue clashes with other event using conflict_algorithm_event view + getstudents - Extrainfo object + session - if result is success then the event has been saved + + """ + if request.method == "POST": + club_name = None + result = None + message = None + try: + event_name = request.POST.get("event_name") + incharge = request.POST.get("incharge") + venue = request.POST.get("venue_type") + event_poster = request.FILES.get("event_poster") + date = request.POST.get("date") + start_time = request.POST.get("start_time") + end_time = request.POST.get("end_time") + desc = request.POST.get("d_d") + club_name = coordinator_club(request) + result = conflict_algorithm_event(date, start_time, end_time, venue) + message = "" + getstudents = ExtraInfo.objects.select_related("user", "department").filter( + user_type="student" + ) + recipients = User.objects.filter(extrainfo__in=getstudents) + if result == "success": + event = Event_info( + club=club_name, + event_name=event_name, + incharge=incharge, + venue=venue, + date=date, + start_time=start_time, + end_time=end_time, + event_poster=event_poster, + details=desc, + ) + event.save() + message += "Your form has been dispatched for further process" + gymkhana_event( + request.user, + recipients, + "new_event", + club_name, + event_name, + desc, + venue, + ) + else: + message += "The selected time slot for the given date and venue conflicts with already booked session" + except Exception as e: + result = "error" + message = "Some error occurred" + + content = {"status": result, "message": message} + content = json.dumps(content) + return HttpResponse(content) + @login_required def fest_budget(request): - """ - This view uploads the budget details for the fest to the database. - Then the academic management can check the budget and accordingly allot the budget. - - @param: - fest - takes the name of the fest - budget_amt - the amount that is needed for the club - budget_file - have to upload the file that contails all details about the budget for fest - descrition - anything that we want write about fest - year - year fest is happening - fest_budget - the given details saved to the database - - """ - if request.method == 'POST' and request.FILES['file']: - fest = request.POST.get("fest") - budget_amt = request.POST.get('amount') - budget_file = request.FILES['file'] - desc = request.POST.get('d_d') - year = request.POST.get('year') - budget_file.name = fest+"_budget_"+year - - fest_budget = Fest_budget(fest=fest, budget_amt=budget_amt, - budget_file=budget_file, description=desc, year=year) - fest_budget.save() - messages.success(request, "Successfully uploaded the budget !!!") - - return redirect('/gymkhana/') + """ + This view uploads the budget details for the fest to the database. + Then the academic management can check the budget and accordingly allot the budget. + + @param: + fest - takes the name of the fest + budget_amt - the amount that is needed for the club + budget_file - have to upload the file that contails all details about the budget for fest + descrition - anything that we want write about fest + year - year fest is happening + fest_budget - the given details saved to the database + + """ + if request.method == "POST" and request.FILES["file"]: + fest = request.POST.get("fest") + budget_amt = request.POST.get("amount") + budget_file = request.FILES["file"] + desc = request.POST.get("d_d") + year = request.POST.get("year") + budget_file.name = fest + "_budget_" + year + + fest_budget = Fest_budget( + fest=fest, + budget_amt=budget_amt, + budget_file=budget_file, + description=desc, + year=year, + ) + fest_budget.save() + messages.success(request, "Successfully uploaded the budget !!!") + + return redirect("/gymkhana/") @login_required def approve(request): - """ - This view is used by the clubs to approve the students who wants to join the club and changes status of student to confirmed. - It gets a list of students who has to be approved and checks them and approves accordingly. - - @variables: - approve_list - list of students who has to be checked and approved. - remarks - gets remarks list if any remarks present - club_member - gets the object(club and student) and the confirms the status of student in the club. - """ - approve_list = list(request.POST.getlist('check')) - for user in approve_list: - # pos = lis.index(user) - remark = "remarks" + user - remarks = request.POST.getlist(remark) - user = user.split(',') - info = user[0].split(' - ') - - # getting queryset class objects - user_name = get_object_or_404(User, username=info[1]) - extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) - student = get_object_or_404(Student, id=extra1) - - club_member = get_object_or_404(Club_member, club=user[1], member=student) - club_member.status = "confirmed" - club_member.remarks = remarks[0] - club_member.save() - messages.success(request, "Successfully Approved !!!") - - return redirect('/gymkhana/') + """ + This view is used by the clubs to approve the students who want to join the club and changes the status of the student to 'confirmed'. + It gets a list of students who have to be approved and approves them accordingly. + """ + approve_list = list(request.POST.getlist("check")) + + for user in approve_list: + remark = "remarks" + user + remarks = request.POST.getlist(remark) + user = user.split(",") + info = user[0].split(" - ") + + # Retrieve User, ExtraInfo, and Student objects + user_name = get_object_or_404(User, username=info[1]) + extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) + student = get_object_or_404(Student, id=extra1) + + # Check if the user is already a member of the club + existing_club_member = Club_member.objects.filter( + club=user[1], member=student + ).first() + + if existing_club_member: + # If the user is already a member, update the existing entry and delete past entry + existing_club_member.status = "confirmed" + existing_club_member.remarks = remarks[0] + existing_club_member.save() + + # Delete past entries + Club_member.objects.filter(club=user[1], member=student).exclude( + id=existing_club_member.id + ).delete() + + else: + # If the user is not already a member, create a new entry + new_club_member = Club_member.objects.create( + club=user[1], member=student, status="confirmed", remarks=remarks[0] + ) + new_club_member.save() + + messages.success(request, "Successfully Approved !!!") + + return redirect("/gymkhana/") + @login_required def club_approve(request): - """ - This view is used by the administration to approve the clubs. - It gets a list of clubs and then approves if they want to. - - @variables: - club_approve_list - list of clubs which has to be approved - club_name - gets the object and then confirms the club - - """ - club_approve_list = list(request.POST.getlist('check')) - for club in club_approve_list: - club_name = get_object_or_404(Club_info, club_name=club) - club_name.status = "confirmed" - club_name.save() - messages.success(request, "Successfully Approved !!!") - - return redirect('/gymkhana/') + if request.method == "POST": + club_approve_list = request.POST.getlist("check") + for club in club_approve_list: + club_info = get_object_or_404(Club_info, club_name=club) + club_info.status = "confirmed" + club_info.created_on = timezone.now() + club_info.save() + + user_name1 = get_object_or_404(User, username=club_info.co_ordinator) + extra1 = get_object_or_404( + ExtraInfo, id=club_info.co_ordinator, user=user_name1 + ) + student1 = get_object_or_404(Student, id=extra1) + + user_name2 = get_object_or_404(User, username=club_info.co_coordinator) + extra2 = get_object_or_404( + ExtraInfo, id=club_info.co_coordinator, user=user_name2 + ) + student2 = get_object_or_404(Student, id=extra2) + + co_user = User.objects.get(username=club_info.co_ordinator) + co_co_user = User.objects.get(username=club_info.co_coordinator) + + HoldsDesignation.objects.create( + designation_id=56, user_id=co_user.id, working_id=co_user.id + ) + HoldsDesignation.objects.create( + designation_id=57, user_id=co_co_user.id, working_id=co_co_user.id + ) + + Club_member.objects.create( + club_id=club_info.club_name, member=student1, status="confirmed" + ) + Club_member.objects.create( + club_id=club_info.club_name, member=student2, status="confirmed" + ) + messages.success( + request, f"Successfully approved {club_info.club_name} club." + ) + + return redirect("/gymkhana/") @login_required def club_reject(request): - """ + """ This view is used by the administration to reject the clubs. - It gets a list of clubs and then rejects if they want to. - - @variables: - club_reject_list - list of clubs which has to be checked and rejected - club_name - gets the object and then rejects the club - - """ - club_reject_list = list(request.POST.getlist('check')) - for club in club_reject_list: - club_name = get_object_or_404(Club_info, club_name=club) - club_name.status = "rejected" - club_name.save() - messages.success(request, "Successfully Rejected !!!") - - return redirect('/gymkhana/') + It gets a list of clubs and then rejects if they want to. + + @variables: + club_reject_list - list of clubs which has to be checked and rejected + club_name - gets the object and then rejects the club + + """ + club_reject_list = request.POST.getlist("check") + for club in club_reject_list: + club_name = get_object_or_404(Club_info, club_name=club) + club_name.status = "rejected" + club_name.save() + messages.success(request, "Successfully Rejected !!!") + + return redirect("/gymkhana/") + @login_required def reject(request): - """ - This view is used by the clubs to approve the students who wants to join the club. - It gets a list of students who has to be approved and checks them and approves accordingly. - - @variables: - approve_list - list of students who has to be checked and approved. - remarks - gets remarks list if any remarks present - - """ - reject_list = list(request.POST.getlist('check')) - - for user in reject_list: - # pos = lis.index(user) - remark = "remarks" + user - remarks = request.POST.getlist(remark) - user = user.split(',') - info = user[0].split(' - ') - - # getting queryset class objects - user_name = get_object_or_404(User, username=info[1]) - extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) - student = get_object_or_404(Student, id=extra1) - - club_member = get_object_or_404(Club_member, club=user[1], member=student) - club_member.status = "rejected" - club_member.remarks = remarks[0] - club_member.save() - messages.success(request, "Successfully Rejected !!!") - - return redirect('/gymkhana/') - - return redirect('/gymkhana/') + """ + This view is used by the clubs to approve the students who wants to join the club. + It gets a list of students who has to be approved and checks them and approves accordingly. + + @variables: + approve_list - list of students who has to be checked and approved. + remarks - gets remarks list if any remarks present + + """ + reject_list = list(request.POST.getlist("check")) + + for user in reject_list: + # pos = lis.index(user) + remark = "remarks" + user + remarks = request.POST.getlist(remark) + user = user.split(",") + info = user[0].split(" - ") + + # getting queryset class objects + user_name = get_object_or_404(User, username=info[1]) + extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) + student = get_object_or_404(Student, id=extra1) + + club_member = get_object_or_404(Club_member, club=user[1], member=student) + club_member.status = "rejected" + club_member.remarks = remarks[0] + club_member.save() + messages.success(request, "Successfully Rejected !!!") + + return redirect("/gymkhana/") + + return redirect("/gymkhana/") + @login_required def cancel(request): - """ + """ This function is used to cancel/remove the member from a club. It gets the list of student and checks in their club and the deletes the student from that club. - Finally gets the message successfully deleted. + Finally gets the message successfully deleted. - @variables: - cancel_list - list of students who are to be removed/delted from club. - club_member - checks the object and then deletes the member from club. - """ + @variables: + cancel_list - list of students who are to be removed/delted from club. + club_member - checks the object and then deletes the member from club. + """ - cancel_list = list(request.POST.getlist('check')) + cancel_list = list(request.POST.getlist("check")) - for user in cancel_list: - #pos = lis.index(user) - user = user.split(',') - info = user[0].split(' - ') + for user in cancel_list: + # pos = lis.index(user) + user = user.split(",") + info = user[0].split(" - ") - # getting queryset class objects - user_name = get_object_or_404(User, username=info[1]) - extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) - student = get_object_or_404(Student, id=extra1) + # getting queryset class objects + user_name = get_object_or_404(User, username=info[1]) + extra1 = get_object_or_404(ExtraInfo, id=info[0], user=user_name) + student = get_object_or_404(Student, id=extra1) - club_member = get_object_or_404( - Club_member, club=user[1], member=student) + club_member = get_object_or_404(Club_member, club=user[1], member=student) - club_member.delete() - messages.success(request, "Successfully deleted !!!") + club_member.delete() + messages.success(request, "Successfully deleted !!!") - return redirect('/gymkhana/') + return redirect("/gymkhana/") @login_required @csrf_exempt def date_sessions(request): - """ - date_sessions: - this function is used to return the details of the Session_info for the requested date - and sends the serialized data - @param: - request - trivial - @variables: - value - contains the requested date - get_sessions - contains the details of the Club's from the Session_info which are having sessions on the requested date - dates - it's a list which contains the data present in the get_sessions - - """ - if(request.is_ajax()): - value = request.POST.get('date') - get_sessions = Session_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').filter(date=value).order_by('start_time') - dates = [] - for session_info in get_sessions: - dates.append(session_info) - dates = serializers.serialize('json', dates) - return HttpResponse(dates) + """ + date_sessions: + this function is used to return the details of the Session_info for the requested date + and sends the serialized data + @param: + request - trivial + @variables: + value - contains the requested date + get_sessions - contains the details of the Club's from the Session_info which are having sessions on the requested date + dates - it's a list which contains the data present in the get_sessions + + """ + if request.is_ajax(): + value = request.POST.get("date") + get_sessions = ( + Session_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ) + .filter(date=value) + .order_by("start_time") + ) + dates = [] + for session_info in get_sessions: + dates.append(session_info) + dates = serializers.serialize("json", dates) + return HttpResponse(dates) + @login_required @csrf_exempt def date_events(request): - """ - date_sessions: - this function is used to return the details of the Event_info for the requested date and sends the serialized data - @param: - request - trivial - @variables: - value - contains the requested date - get_events - contains the details of the Club's from the Event_info which are having events on the requested date - dates - it's a list which contains the data present in the get_events - - """ - if(request.method=='POST'): - value = request.POST.get('date') - get_events = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').filter(date=value).order_by('start_time') - dates = [] - for event_info in get_events: - dates.append(event_info) - dates = serializers.serialize('json', dates) - return HttpResponse(dates) - return HttpResponse("Hurray") - -#this algorithm checks if the passed slot time coflicts with any of already booked sessions + """ + date_sessions: + this function is used to return the details of the Event_info for the requested date and sends the serialized data + @param: + request - trivial + @variables: + value - contains the requested date + get_events - contains the details of the Club's from the Event_info which are having events on the requested date + dates - it's a list which contains the data present in the get_events + + """ + if request.method == "POST": + value = request.POST.get("date") + get_events = ( + Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ) + .filter(date=value) + .order_by("start_time") + ) + dates = [] + for event_info in get_events: + dates.append(event_info) + dates = serializers.serialize("json", dates) + return HttpResponse(dates) + return HttpResponse("Hurray") + + +# this algorithm checks if the passed slot time coflicts with any of already booked sessions def conflict_algorithm_session(date, start_time, end_time, venue): - #converting string to datetime type variable - """ - conflict_algorithm_session: - this algorithm is used to find if there any avaiable slot for the given date , stat_time ,end_time and venue - from the session_info to book the slot else it returns error. - @param: - date - date of the slot - start_time - starting time for the slot - end_time - ending time for the slot - venue - venue for the slot - @variables: - - booked_session - contains the session_info of all previously alloted slots - """ - start_time = datetime.datetime.strptime(start_time, '%H:%M').time() - end_time = datetime.datetime.strptime(end_time, '%H:%M').time() - booked_Sessions = Session_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').filter(date=date, venue=venue) - - #placing start time and end time in tuple fashion inside this list - slots = [(start_time, end_time)] - for value in booked_Sessions: - slots.append((value.start_time, value.end_time)) - slots.sort() - #if there isn't any slot present for the selected day just book the session - if (len(slots) == 1): - return "success" - else: - #this whole logic checks if the end time of any slot is less than the start time of next slot - counter = slots[0][1] - flag = 0 - i=1 - while i < len(slots): - if (slots[i][0] < counter): - flag = 1 - break - counter = slots[i][1] - i = i + 1 - if (flag == 0): - return "success" - else: - return "error" + # converting string to datetime type variable + """ + conflict_algorithm_session: + this algorithm is used to find if there any avaiable slot for the given date , stat_time ,end_time and venue + from the session_info to book the slot else it returns error. + @param: + date - date of the slot + start_time - starting time for the slot + end_time - ending time for the slot + venue - venue for the slot + @variables: + + booked_session - contains the session_info of all previously alloted slots + """ + start_time = datetime.datetime.strptime(start_time, "%H:%M").time() + end_time = datetime.datetime.strptime(end_time, "%H:%M").time() + booked_Sessions = Session_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).filter(date=date, venue=venue) + + # placing start time and end time in tuple fashion inside this list + slots = [(start_time, end_time)] + for value in booked_Sessions: + slots.append((value.start_time, value.end_time)) + slots.sort() + # if there isn't any slot present for the selected day just book the session + if len(slots) == 1: + return "success" + else: + # this whole logic checks if the end time of any slot is less than the start time of next slot + counter = slots[0][1] + flag = 0 + i = 1 + while i < len(slots): + if slots[i][0] < counter: + flag = 1 + break + counter = slots[i][1] + i = i + 1 + if flag == 0: + return "success" + else: + return "error" + ##helper function to get the target user for the voting poll def get_target_user(groups): - """ - get_target_user: - This function helps to fetch the passed list to Dictionary of Key unique batches(years) and - values of braches and remove the redundancy and returns the "dic" through Json string - @param: - groups : This takes the info of which brach and batch can access(voting) this poll - """ - dic = {} - for i in range(len(groups)): - value = groups[i].split(":") - batch = value[0] - branch = value[1] - if dic.get(batch): - if dic[batch][0] != 'All': - dic[batch].append(branch) - else: - dic[batch] = [branch] - return json.dumps(dic) + """ + get_target_user: + This function helps to fetch the passed list to Dictionary of Key unique batches(years) and + values of braches and remove the redundancy and returns the "dic" through Json string + @param: + groups : This takes the info of which brach and batch can access(voting) this poll + """ + dic = {} + for i in range(len(groups)): + value = groups[i].split(":") + batch = value[0] + branch = value[1] + if dic.get(batch): + if dic[batch][0] != "All": + dic[batch].append(branch) + else: + dic[batch] = [branch] + return json.dumps(dic) + ## Voting Polls @login_required def voting_poll(request): - """ - voting_poll: - This view creates new voting poll by taking the values from Front-end and add this poll details - to "Voting_polls" database and also it create and add object of "Voting_choices" contains - poll_event and title>. Finally it calls gymkhana_voting as per the data given to "groups" - @param: - request : trivial - @variables: - title : Title of the voting poll - description : It describes that what this poll is for - choices : Choices of the voting poll - exp_data : Expire date of the voting poll - groups : This takes the info of which brach and batch can access(voting) this poll - """ - if request.POST: - try: - body = request.POST - title = body.get('title') - description = body.get('desc') - choices = body.getlist('choices') - exp_date = body.get('expire_date') - groups = body.getlist('groups') - target_groups = get_target_user(groups) - name = request.user.first_name + " " + request.user.last_name - roll = request.user - created_by = str(name) +":"+ str(roll) - new_poll = Voting_polls(title=title, description=description, exp_date=exp_date, created_by = str(created_by),groups=target_groups) - new_poll.save() - for choice in choices: - new_choice = Voting_choices(poll_event=new_poll,title=choice) - new_choice.save() - for i in range(len(groups)): - value = groups[i].split(":") - batch = value[0] - branch = value[1] - allbatch = User.objects.filter(username__contains = batch) - selbranch = ExtraInfo.objects.select_related('user','department').filter(department__name = branch) - batchbranch = User.objects.filter(username__contains = batch, extrainfo__in=selbranch) - if branch == 'All': - gymkhana_voting(request.user, allbatch, 'voting_open', title, description) - else: - gymkhana_voting(request.user, batchbranch, 'voting_open', title, description) - return redirect('/gymkhana/') - except Exception as e: - res = "error" - message = "Some error occurred" - logger.info(e) - content = { - 'status':res, - 'message':message - } - content = json.dumps(content) - return HttpResponse(content) - - return redirect('/gymkhana/') + """ + voting_poll: + This view creates new voting poll by taking the values from Front-end and add this poll details + to "Voting_polls" database and also it create and add object of "Voting_choices" contains + poll_event and title>. Finally it calls gymkhana_voting as per the data given to "groups" + @param: + request : trivial + @variables: + title : Title of the voting poll + description : It describes that what this poll is for + choices : Choices of the voting poll + exp_data : Expire date of the voting poll + groups : This takes the info of which brach and batch can access(voting) this poll + """ + if request.POST: + try: + body = request.POST + title = body.get("title") + description = body.get("desc") + choices = body.getlist("choices") + exp_date = body.get("expire_date") + groups = body.getlist("groups") + target_groups = get_target_user(groups) + name = request.user.first_name + " " + request.user.last_name + roll = request.user + created_by = str(name) + ":" + str(roll) + new_poll = Voting_polls( + title=title, + description=description, + exp_date=exp_date, + created_by=str(created_by), + groups=target_groups, + ) + new_poll.save() + for choice in choices: + new_choice = Voting_choices(poll_event=new_poll, title=choice) + new_choice.save() + for i in range(len(groups)): + value = groups[i].split(":") + batch = value[0] + branch = value[1] + allbatch = User.objects.filter(username__contains=batch) + selbranch = ExtraInfo.objects.select_related( + "user", "department" + ).filter(department__name=branch) + batchbranch = User.objects.filter( + username__contains=batch, extrainfo__in=selbranch + ) + if branch == "All": + gymkhana_voting( + request.user, allbatch, "voting_open", title, description + ) + else: + gymkhana_voting( + request.user, batchbranch, "voting_open", title, description + ) + return redirect("/gymkhana/") + except Exception as e: + res = "error" + message = "Some error occurred" + logger.info(e) + content = {"status": res, "message": message} + content = json.dumps(content) + return HttpResponse(content) + + return redirect("/gymkhana/") + @login_required -def vote(request,poll_id): - """ - vote: - This view will update(increase) votes by 1 for particular 'submitted_choice' then it adds the - voter(student)ID and poll_event for which he/she votes. Finally it saves to the database - redirect to '/gymkhana/'. In case of any exception it return "error" - @param: - poll_id : ID of the poll - request : trivial - @variables: - submitted_choice : Choice of the user selected for poll_event - choice : It is a object contains all data of "submitted_choice" from Voting_choices - new_voter : creating object of Voting_voter to save the voter info - """ - poll = Voting_polls.objects.get(pk=poll_id) - if request.POST: - try: - body = request.POST - submitted_choice = body.get('choice') - choice = Voting_choices.objects.select_related('poll_event').get(pk=submitted_choice) - choice.votes += 1 - choice.save() - new_voter = Voting_voters(poll_event=poll, student_id=str(request.user)) - new_voter.save() - return redirect('/gymkhana/') - except Exception as e: - logger.info(e) - return HttpResponse('error') - data = serializers.serialize('json',Voting_choices.objects.select_related('poll_event').all()) - return redirect('/gymkhana/') +def vote(request, poll_id): + """ + vote: + This view will update(increase) votes by 1 for particular 'submitted_choice' then it adds the + voter(student)ID and poll_event for which he/she votes. Finally it saves to the database + redirect to '/gymkhana/'. In case of any exception it return "error" + @param: + poll_id : ID of the poll + request : trivial + @variables: + submitted_choice : Choice of the user selected for poll_event + choice : It is a object contains all data of "submitted_choice" from Voting_choices + new_voter : creating object of Voting_voter to save the voter info + """ + poll = Voting_polls.objects.get(pk=poll_id) + if request.POST: + try: + body = request.POST + submitted_choice = body.get("choice") + choice = Voting_choices.objects.select_related("poll_event").get( + pk=submitted_choice + ) + choice.votes += 1 + choice.save() + new_voter = Voting_voters(poll_event=poll, student_id=str(request.user)) + new_voter.save() + return redirect("/gymkhana/") + except Exception as e: + logger.info(e) + return HttpResponse("error") + data = serializers.serialize( + "json", Voting_choices.objects.select_related("poll_event").all() + ) + return redirect("/gymkhana/") + @login_required def delete_poll(request, poll_id): - """ - delete_poll: - This view delete the particular voting poll which is passed through function and redirect - to "/gymkhana/" if there is an exception then it return the HttpResponse of "error" - @param: - request : trivial - poll_id : id of the poll in Voting_polls - @variables: - poll : It is an object stores the all data of poll_id from Voting_poll - """ - try: - poll = Voting_polls.objects.filter(pk=poll_id) - poll.delete() - return redirect('/gymkhana/') - except Exception as e: - logger.info(e) - return HttpResponse('error') - - return redirect('/gymkhana/') - -#this algorithm checks if the passed slot time coflicts with any of already booked events + """ + delete_poll: + This view delete the particular voting poll which is passed through function and redirect + to "/gymkhana/" if there is an exception then it return the HttpResponse of "error" + @param: + request : trivial + poll_id : id of the poll in Voting_polls + @variables: + poll : It is an object stores the all data of poll_id from Voting_poll + """ + try: + poll = Voting_polls.objects.filter(pk=poll_id) + poll.delete() + return redirect("/gymkhana/") + except Exception as e: + logger.info(e) + return HttpResponse("error") + + return redirect("/gymkhana/") + + +# this algorithm checks if the passed slot time coflicts with any of already booked events +@login_required +def budget_approve(request): + """ + This view is used by the administration to approve the clubs_budget. + It gets a list of clubs and then approves_budget if they want to. + + @variables: + club_approve_list - list of clubs which has to be approved + club_name - gets the object and then confirms the club + """ + if request.method == "POST": + budget_approve_list = list(request.POST.getlist("check")) + first_words = [] + for item in budget_approve_list: + first_word = item.split()[0] + first_words.append(first_word) + + for club in first_words: + print(club) + club_budget = Club_budget.objects.get(club_id=club, status="open") # Ensure status is open + club_budget.status = "confirmed" + club_budget.save() + messages.success( + request, f"Successfully budget approved for club." + ) + return redirect("/gymkhana/") + + +@login_required +def budget_reject(request): + """ + This view is used by the administration to reject the clubs. + It gets a list of clubs and then rejects if they want to. + + @variables: + club_reject_list - list of clubs which has to be checked and rejected + club_name - gets the object and then rejects the club + + """ + if request.method == "POST": + budget_approve_list = list(request.POST.getlist("check")) + first_words = [] + for item in budget_approve_list: + first_word = item.split()[0] + first_words.append(first_word) + + for club in first_words: + print(club) + club_budget = Club_budget.objects.get( + club_id=club, status="open" + ) # Ensure status is open + club_budget.status = "rejected" + club_budget.save() + messages.success(request, f"Successfully budget rejected for club.") + return redirect("/gymkhana/") + def conflict_algorithm_event(date, start_time, end_time, venue): - """ - conflict_algorithm_event: - This view takes the date, start_time , end_time , Venue which is passed by function and - checks with data in database then it returns "success" if there is no time slot is clashng - with passed data and returns "error" if there is some time slot is clashing with passed - data - @param: - date : date of the event - start_time : Event's starting time - end_time : Event's ending time - venue : Venue of the event - @variables: - booked_Events : This is an object contains all data of Event_info for which date - and venue is equal to passed date and venue - """ - #converting string to datetime type variable - start_time = datetime.datetime.strptime(start_time, '%H:%M').time() - end_time = datetime.datetime.strptime(end_time, '%H:%M').time() - booked_Events = Event_info.objects.select_related('club','club__co_ordinator','club__co_ordinator__id','club__co_ordinator__id__user','club__co_ordinator__id__department','club__co_coordinator','club__co_coordinator__id','club__co_coordinator__id__user','club__co_coordinator__id__department','club__faculty_incharge','club__faculty_incharge__id','club__faculty_incharge__id__user','club__faculty_incharge__id__department').filter(date=date, venue=venue) - - #placing start time and end time in tuple fashion inside this list - slots = [(start_time, end_time)] - for value in booked_Events: - slots.append((value.start_time, value.end_time)) - slots.sort() - #if there isn't any slot present for the selected day just book the event - if (len(slots) == 1): - return "success" - else: - #this whole logic checks if the end time of any slot is less than the start time of next slot - counter = slots[0][1] - flag = 0 - i=1 - while i < len(slots): - if (slots[i][0] < counter): - flag = 1 - break - counter = slots[i][1] - i = i + 1 - if (flag == 0): - return "success" - else: - return "error" - -@login_required(login_url = "/accounts/login/") + """ + conflict_algorithm_event: + This view takes the date, start_time , end_time , Venue which is passed by function and + checks with data in database then it returns "success" if there is no time slot is clashng + with passed data and returns "error" if there is some time slot is clashing with passed + data + @param: + date : date of the event + start_time : Event's starting time + end_time : Event's ending time + venue : Venue of the event + @variables: + booked_Events : This is an object contains all data of Event_info for which date + and venue is equal to passed date and venue + """ + # converting string to datetime type variable + start_time = datetime.datetime.strptime(start_time, "%H:%M").time() + end_time = datetime.datetime.strptime(end_time, "%H:%M").time() + booked_Events = Event_info.objects.select_related( + "club", + "club__co_ordinator", + "club__co_ordinator__id", + "club__co_ordinator__id__user", + "club__co_ordinator__id__department", + "club__co_coordinator", + "club__co_coordinator__id", + "club__co_coordinator__id__user", + "club__co_coordinator__id__department", + "club__faculty_incharge", + "club__faculty_incharge__id", + "club__faculty_incharge__id__user", + "club__faculty_incharge__id__department", + ).filter(date=date, venue=venue) + + # placing start time and end time in tuple fashion inside this list + slots = [(start_time, end_time)] + for value in booked_Events: + slots.append((value.start_time, value.end_time)) + slots.sort() + # if there isn't any slot present for the selected day just book the event + if len(slots) == 1: + return "success" + else: + # this whole logic checks if the end time of any slot is less than the start time of next slot + counter = slots[0][1] + flag = 0 + i = 1 + while i < len(slots): + if slots[i][0] < counter: + flag = 1 + break + counter = slots[i][1] + i = i + 1 + if flag == 0: + return "success" + else: + return "error" + + +@login_required(login_url="/accounts/login/") def filetracking(request): - """ - The function is used to create files by current user(employee). - It adds the employee(uploader) and file datails to a file(table) of filetracking(model) - if he intends to create file. - - @param: - request - trivial. - - @variables: - - - uploader - Employee who creates file. - subject - Title of the file. - description - Description of the file. - upload_file - Attachment uploaded while creating file. - file - The file object. - exations - The HoldsDesignation object. - context - Hotrainfo - The Extrainfo object. - holdsdesignlds data needed to make necessary changes in the template. - """ - if request.method =="POST": - try: - if 'save' in request.POST: - uploader = request.user.extrainfo - logger.info(uploader) - #ref_id = request.POST.get('fileid') - subject = request.POST.get('title') - description = request.POST.get('desc') - design = request.POST.get('design') - designation = Designation.objects.get(id=design) - upload_file = request.FILES.get('myfile') - - File.objects.create( - uploader=uploader, - #ref_id=ref_id, - description=description, - subject=subject, - designation=designation, - upload_file=upload_file - ) - - if 'send' in request.POST: - - - uploader = request.user.extrainfo - logger.info(uploader) - #ref_id = request.POST.get('fileid') - subject = request.POST.get('title') - description = request.POST.get('desc') - design = request.POST.get('design') - logger.info("designation is ", design) - designation = Designation.objects.get(id = HoldsDesignation.objects.select_related('user','working','designation').get(id = design).designation_id) - - upload_file = request.FILES.get('myfile') - - file = File.objects.create( - uploader=uploader, - #ref_id=ref_id, - description=description, - subject=subject, - designation=designation, - upload_file=upload_file - ) - - - current_id = request.user.extrainfo - remarks = request.POST.get('remarks') - - sender = request.POST.get('design') - current_design = HoldsDesignation.objects.select_related('user','working','designation').get(id=sender) - - receiver = request.POST.get('receiver') - receiver_id = User.objects.get(username=receiver) - logger.info("Receiver_id = ") - logger.info(receiver_id) - receive = request.POST.get('recieve') - logger.info("recieve = ") - logger.info(receive) - receive_designation = Designation.objects.filter(name=receive) - logger.info("receive_designation = ") - logger.info(receive_designation) - receive_design = receive_designation[0] - upload_file = request.FILES.get('myfile') - return HttpResponse ("success") - Tracking.objects.create( - file_id=file, - current_id=current_id, - current_design=current_design, - receive_design=receive_design, - receiver_id=receiver_id, - remarks=remarks, - upload_file=upload_file, - ) - office_module_notif(request.user, receiver_id) - messages.success(request,'File sent successfully') - - except IntegrityError: - message = "FileID Already Taken.!!" - return HttpResponse(message) - - - - file = File.objects.select_related('uploader','uploader__user','uploader__department','designation').all() - extrainfo = ExtraInfo.objects.select_related('user','department').all() - holdsdesignations = HoldsDesignation.objects.select_related('user','working','designation').all() - designations = HoldsDesignation.objects.select_related('user','working','designation').filter(user = request.user) - - context = { - 'file': file, - 'extrainfo': extrainfo, - 'holdsdesignations': holdsdesignations, - 'designations': designations, - } - return render(request, 'filetracking/composefile.html', context) - -@login_required(login_url = "/accounts/login") + """ + The function is used to create files by current user(employee). + It adds the employee(uploader) and file datails to a file(table) of filetracking(model) + if he intends to create file. + + @param: + request - trivial. + + @variables: + + + uploader - Employee who creates file. + subject - Title of the file. + description - Description of the file. + upload_file - Attachment uploaded while creating file. + file - The file object. + exations - The HoldsDesignation object. + context - Hotrainfo - The Extrainfo object. + holdsdesignlds data needed to make necessary changes in the template. + """ + if request.method == "POST": + try: + if "save" in request.POST: + uploader = request.user.extrainfo + logger.info(uploader) + # ref_id = request.POST.get('fileid') + subject = request.POST.get("title") + description = request.POST.get("desc") + design = request.POST.get("design") + designation = Designation.objects.get(id=design) + upload_file = request.FILES.get("myfile") + + File.objects.create( + uploader=uploader, + # ref_id=ref_id, + description=description, + subject=subject, + designation=designation, + upload_file=upload_file, + ) + + if "send" in request.POST: + uploader = request.user.extrainfo + logger.info(uploader) + # ref_id = request.POST.get('fileid') + subject = request.POST.get("title") + description = request.POST.get("desc") + design = request.POST.get("design") + logger.info("designation is ", design) + designation = Designation.objects.get( + id=HoldsDesignation.objects.select_related( + "user", "working", "designation" + ) + .get(id=design) + .designation_id + ) + + upload_file = request.FILES.get("myfile") + + file = File.objects.create( + uploader=uploader, + # ref_id=ref_id, + description=description, + subject=subject, + designation=designation, + upload_file=upload_file, + ) + current_id = request.user.extrainfo + remarks = request.POST.get("remarks") + sender = request.POST.get("design") + current_design = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).get(id=sender) + receiver = request.POST.get("receiver") + receiver_id = User.objects.get(username=receiver) + logger.info("Receiver_id = ") + logger.info(receiver_id) + receive = request.POST.get("recieve") + logger.info("recieve = ") + logger.info(receive) + receive_designation = Designation.objects.filter(name=receive) + logger.info("receive_designation = ") + logger.info(receive_designation) + receive_design = receive_designation[0] + upload_file = request.FILES.get("myfile") + return HttpResponse("success") + Tracking.objects.create( + file_id=file, + current_id=current_id, + current_design=current_design, + receive_design=receive_design, + receiver_id=receiver_id, + remarks=remarks, + upload_file=upload_file, + ) + office_module_notif(request.user, receiver_id) + messages.success(request, "File sent successfully") + except IntegrityError: + message = "FileID Already Taken.!!" + return HttpResponse(message) + + file = File.objects.select_related( + "uploader", "uploader__user", "uploader__department", "designation" + ).all() + extrainfo = ExtraInfo.objects.select_related("user", "department").all() + holdsdesignations = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).all() + designations = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).filter(user=request.user) + + context = { + "file": file, + "extrainfo": extrainfo, + "holdsdesignations": holdsdesignations, + "designations": designations, + } + return render(request, "filetracking/composefile.html", context) + + +@login_required(login_url="/accounts/login") def forward(request, id): - """ - The function is used to forward files received by user(employee) from other - employees which are filtered from Tracking(table) objects by current user - i.e. receiver_id to other employees. - It also gets track of file created by uploader through all users involved in file - along with their remarks and attachments - It displays details file of a File(table) and remarks and attachments of user involved - in file of Tracking(table) of filetracking(model) in the template. - - @param: - request - trivial. - id - id of the file object which the user intends to forward to other employee. - - @variables: - file - The File object. - track - The Tracking object. - remarks = Remarks posted by user. - receiver = Receiver to be selected by user for forwarding file. - receiver_id = Receiver_id who has been selected for forwarding file. - upload_file = File attached by user. - extrainfo = ExtraInfo object. - holdsdesignations = HoldsDesignation objects. - context - Holds data needed to make necessary changes in the template. - """ - # start = timer() - file = get_object_or_404(File, id=id) - # end = timer() - - # start = timer() - track = Tracking.objects.select_related('file_id','file_id__uploader','file_id__uploader__user','file_id__uploader__department','file_id__designation','current_id','current_id__user','current_id__department','current_design','current_design__user','current_design__working','current_design__designation','receiver_id','receive_design').filter(file_id=file) - # end = timer() - - if request.method == "POST": - if 'finish' in request.POST: - file.complete_flag = True - file.save() - - if 'send' in request.POST: - current_id = request.user.extrainfo - remarks = request.POST.get('remarks') - - sender = request.POST.get('sender') - current_design = HoldsDesignation.objects.select_related('user','working','designation').get(id=sender) - - receiver = request.POST.get('receiver') - receiver_id = User.objects.get(username=receiver) - receive = request.POST.get('recieve') - receive_designation = Designation.objects.filter(name=receive) - receive_design = receive_designation[0] - upload_file = request.FILES.get('myfile') - # return HttpResponse ("success") - Tracking.objects.create( - file_id=file, - current_id=current_id, - current_design=current_design, - receive_design=receive_design, - receiver_id=receiver_id, - remarks=remarks, - upload_file=upload_file, - ) - # start = timer() - - extrainfo = ExtraInfo.objects.select_related('user','department').all() - holdsdesignations = HoldsDesignation.objects.select_related('user','working','designation').all() - designations = HoldsDesignation.objects.select_related('user','working','designation').filter(user=request.user) - - context = { - # 'extrainfo': extrainfo, - # 'holdsdesignations': holdsdesignations, - 'designations':designations, - 'file': file, - 'track': track, - } - - return render(request, 'filetracking/forward.html', context) - - - + """ + The function is used to forward files received by user(employee) from other + employees which are filtered from Tracking(table) objects by current user + i.e. receiver_id to other employees. + It also gets track of file created by uploader through all users involved in file + along with their remarks and attachments + It displays details file of a File(table) and remarks and attachments of user involved + in file of Tracking(table) of filetracking(model) in the template. + + @param: + request - trivial. + id - id of the file object which the user intends to forward to other employee. + + @variables: + file - The File object. + track - The Tracking object. + remarks = Remarks posted by user. + receiver = Receiver to be selected by user for forwarding file. + receiver_id = Receiver_id who has been selected for forwarding file. + upload_file = File attached by user. + extrainfo = ExtraInfo object. + holdsdesignations = HoldsDesignation objects. + context - Holds data needed to make necessary changes in the template. + """ + # start = timer() + file = get_object_or_404(File, id=id) + # end = timer() + + # start = timer() + track = Tracking.objects.select_related( + "file_id", + "file_id__uploader", + "file_id__uploader__user", + "file_id__uploader__department", + "file_id__designation", + "current_id", + "current_id__user", + "current_id__department", + "current_design", + "current_design__user", + "current_design__working", + "current_design__designation", + "receiver_id", + "receive_design", + ).filter(file_id=file) + # end = timer() + + if request.method == "POST": + if "finish" in request.POST: + file.complete_flag = True + file.save() + + if "send" in request.POST: + current_id = request.user.extrainfo + remarks = request.POST.get("remarks") + + sender = request.POST.get("sender") + current_design = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).get(id=sender) + + receiver = request.POST.get("receiver") + receiver_id = User.objects.get(username=receiver) + receive = request.POST.get("recieve") + receive_designation = Designation.objects.filter(name=receive) + receive_design = receive_designation[0] + upload_file = request.FILES.get("myfile") + # return HttpResponse ("success") + Tracking.objects.create( + file_id=file, + current_id=current_id, + current_design=current_design, + receive_design=receive_design, + receiver_id=receiver_id, + remarks=remarks, + upload_file=upload_file, + ) + # start = timer() + + extrainfo = ExtraInfo.objects.select_related("user", "department").all() + holdsdesignations = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).all() + designations = HoldsDesignation.objects.select_related( + "user", "working", "designation" + ).filter(user=request.user) + + context = { + # 'extrainfo': extrainfo, + # 'holdsdesignations': holdsdesignations, + "designations": designations, + "file": file, + "track": track, + } + + return render(request, "filetracking/forward.html", context) diff --git a/FusionIIIT/applications/health_center/migrations/0001_initial.py b/FusionIIIT/applications/health_center/migrations/0001_initial.py deleted file mode 100644 index ee068099e..000000000 --- a/FusionIIIT/applications/health_center/migrations/0001_initial.py +++ /dev/null @@ -1,168 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Appointment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('description', models.CharField(max_length=50)), - ('date', models.DateField()), - ], - ), - migrations.CreateModel( - name='Counter', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('count', models.IntegerField(default=0)), - ('fine', models.IntegerField(default=0)), - ('doc_count', models.IntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='Doctor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('doctor_name', models.IntegerField(choices=[(0, 'Dr.Sharma'), (1, 'Dr.Vinay')])), - ('doctor_phone', models.CharField(max_length=10)), - ('specialization', models.CharField(max_length=100)), - ('active', models.BooleanField(default=True)), - ], - ), - migrations.CreateModel( - name='Hospital', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('hospital_name', models.CharField(max_length=100)), - ('phone', models.CharField(max_length=10)), - ], - ), - migrations.CreateModel( - name='Stock', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('medicine_name', models.CharField(max_length=100)), - ('quantity', models.IntegerField(default=0)), - ('threshold', models.IntegerField(default=10)), - ], - ), - migrations.CreateModel( - name='Schedule', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('day', models.IntegerField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')])), - ('from_time', models.TimeField(blank=True, null=True)), - ('to_time', models.TimeField(blank=True, null=True)), - ('room', models.IntegerField()), - ('date', models.DateField(auto_now=True)), - ('doctor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.doctor')), - ], - ), - migrations.CreateModel( - name='Prescription', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('details', models.CharField(max_length=100)), - ('date', models.DateField()), - ('test', models.CharField(blank=True, max_length=200, null=True)), - ('appointment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='health_center.appointment')), - ('doctor_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='health_center.doctor')), - ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Prescribed_medicine', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity', models.IntegerField(default=0)), - ('days', models.IntegerField(default=0)), - ('times', models.IntegerField(default=0)), - ('medicine_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.stock')), - ('prescription_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.prescription')), - ], - ), - migrations.CreateModel( - name='Medicine', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity', models.IntegerField(default=0)), - ('days', models.IntegerField(default=0)), - ('times', models.IntegerField(default=0)), - ('medicine_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.stock')), - ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Hospital_admit', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('hospital_doctor', models.CharField(max_length=100)), - ('admission_date', models.DateField()), - ('discharge_date', models.DateField(blank=True, null=True)), - ('reason', models.CharField(max_length=50)), - ('doctor_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='health_center.doctor')), - ('hospital_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.hospital')), - ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Expiry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity', models.IntegerField(default=0)), - ('supplier', models.CharField(max_length=50)), - ('expiry_date', models.DateField()), - ('returned', models.BooleanField(default=False)), - ('return_date', models.DateField(blank=True, null=True)), - ('date', models.DateField(auto_now=True)), - ('medicine_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.stock')), - ], - ), - migrations.CreateModel( - name='Complaint', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('feedback', models.CharField(max_length=100, null=True)), - ('complaint', models.CharField(max_length=100, null=True)), - ('date', models.DateField(auto_now=True)), - ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.AddField( - model_name='appointment', - name='doctor_id', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.doctor'), - ), - migrations.AddField( - model_name='appointment', - name='schedule', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='health_center.schedule'), - ), - migrations.AddField( - model_name='appointment', - name='user_id', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo'), - ), - migrations.CreateModel( - name='Ambulance_request', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date_request', models.DateTimeField()), - ('start_date', models.DateField()), - ('end_date', models.DateField(blank=True, null=True)), - ('reason', models.CharField(max_length=50)), - ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - ] diff --git a/FusionIIIT/applications/health_center/migrations/__init__.py b/FusionIIIT/applications/health_center/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/hostel_management/migrations/0001_initial.py b/FusionIIIT/applications/hostel_management/migrations/0001_initial.py deleted file mode 100644 index ef1639d4c..000000000 --- a/FusionIIIT/applications/hostel_management/migrations/0001_initial.py +++ /dev/null @@ -1,137 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import django.db.models.fields.related -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Hall', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('hall_id', models.CharField(max_length=10)), - ('hall_name', models.CharField(max_length=50)), - ('max_accomodation', models.IntegerField(default=0)), - ('number_students', models.PositiveIntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='WorkerReport', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('worker_id', models.CharField(max_length=10)), - ('worker_name', models.CharField(max_length=50)), - ('year', models.IntegerField(default=2020)), - ('month', models.IntegerField(default=1)), - ('absent', models.IntegerField(default=0)), - ('total_day', models.IntegerField(default=31)), - ('remark', models.CharField(max_length=100)), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ], - ), - migrations.CreateModel( - name='StaffSchedule', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('staff_type', models.CharField(default='Caretaker', max_length=100)), - ('day', models.CharField(choices=[('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday', 'Wednesday'), ('Thursday', 'Thursday'), ('Friday', 'Friday'), ('Saturday', 'Saturday'), ('Sunday', 'Sunday')], max_length=15)), - ('start_time', models.TimeField(blank=True, null=True)), - ('end_time', models.TimeField(blank=True, null=True)), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ('staff_id', models.ForeignKey(on_delete=django.db.models.fields.related.ForeignKey, to='globals.staff')), - ], - ), - migrations.CreateModel( - name='HostelStudentAttendence', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('present', models.BooleanField()), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='HostelNoticeBoard', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('head_line', models.CharField(max_length=100)), - ('content', models.FileField(blank=True, null=True, upload_to='hostel_management/')), - ('description', models.TextField(blank=True)), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ('posted_by', models.ForeignKey(on_delete=django.db.models.fields.related.ForeignKey, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='HallWarden', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('faculty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.faculty')), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ], - ), - migrations.CreateModel( - name='HallRoom', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('room_no', models.CharField(max_length=4)), - ('block_no', models.CharField(max_length=1)), - ('room_cap', models.IntegerField(default=3)), - ('room_occupied', models.IntegerField(default=0)), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ], - ), - migrations.CreateModel( - name='HallCaretaker', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.staff')), - ], - ), - migrations.CreateModel( - name='GuestRoomDetail', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('room_no', models.CharField(max_length=4, unique=True)), - ('room_status', models.CharField(choices=[('Booked', 'Booked'), ('CheckedIn', 'Checked In'), ('Available', 'Available'), ('UnderMaintenance', 'Under Maintenance')], default='Available', max_length=20)), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ], - ), - migrations.CreateModel( - name='GuestRoomBooking', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('guest_name', models.CharField(max_length=100)), - ('guest_phone', models.CharField(max_length=15)), - ('guest_email', models.CharField(blank=True, max_length=40)), - ('guest_address', models.TextField(blank=True)), - ('rooms_required', models.IntegerField(blank=True, default=1, null=True)), - ('total_guest', models.IntegerField(default=1)), - ('purpose', models.TextField()), - ('arrival_date', models.DateField()), - ('arrival_time', models.TimeField()), - ('departure_date', models.DateField()), - ('departure_time', models.TimeField()), - ('status', models.CharField(choices=[('Confirmed', 'Confirmed'), ('Pending', 'Pending'), ('Rejected', 'Rejected'), ('Canceled', 'Canceled'), ('CancelRequested', 'Cancel Requested'), ('CheckedIn', 'Checked In'), ('Complete', 'Complete'), ('Forward', 'Forward')], default='Pending', max_length=15)), - ('booking_date', models.DateField(default=django.utils.timezone.now)), - ('nationality', models.CharField(blank=True, max_length=20)), - ('guest_room_id', models.ManyToManyField(to='hostel_management.GuestRoomDetail')), - ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hostel_management.hall')), - ('intender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/FusionIIIT/applications/hostel_management/migrations/__init__.py b/FusionIIIT/applications/hostel_management/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/hr2/migrations/0001_initial.py b/FusionIIIT/applications/hr2/migrations/0001_initial.py deleted file mode 100644 index 83b197c8f..000000000 --- a/FusionIIIT/applications/hr2/migrations/0001_initial.py +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='WorkAssignemnt', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_date', models.DateField(blank=True, max_length=6, null=True)), - ('end_date', models.DateField(blank=True, max_length=6, null=True)), - ('job_title', models.CharField(default='', max_length=50)), - ('orders_copy', models.FileField(blank=True, null=True, upload_to='')), - ('extra_info', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='ForeignService', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_date', models.DateField(blank=True, max_length=6, null=True)), - ('end_date', models.DateField(blank=True, max_length=6, null=True)), - ('job_title', models.CharField(default='', max_length=50)), - ('organisation', models.CharField(default='', max_length=100)), - ('description', models.CharField(default='', max_length=300)), - ('salary_source', models.CharField(default='', max_length=100)), - ('designation', models.CharField(default='', max_length=100)), - ('service_type', models.CharField(choices=[('LIEN', 'LIEN'), ('DEPUTATION', 'DEPUTATION'), ('OTHER', 'OTHER')], max_length=100)), - ('extra_info', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Employee', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('father_name', models.CharField(default='', max_length=40)), - ('mother_name', models.CharField(default='', max_length=40)), - ('religion', models.CharField(default='', max_length=40)), - ('category', models.CharField(choices=[('SC', 'SC'), ('ST', 'ST'), ('OBC', 'OBC'), ('GENERAL', 'GENERAL'), ('PWD', 'PWD')], max_length=50)), - ('cast', models.CharField(default='', max_length=40)), - ('home_state', models.CharField(default='', max_length=40)), - ('home_district', models.CharField(default='', max_length=40)), - ('date_of_joining', models.DateField(blank=True, null=True)), - ('designation', models.CharField(default='', max_length=40)), - ('blood_group', models.CharField(choices=[('AB+', 'AB+'), ('O+', 'O+'), ('AB-', 'AB-'), ('B+', 'B+'), ('B-', 'B-'), ('O-', 'O-'), ('A+', 'A+'), ('A-', 'A-')], max_length=50)), - ('extra_info', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='EmpDependents', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(default='', max_length=100)), - ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], max_length=50)), - ('dob', models.DateField(max_length=6, null=True)), - ('relationship', models.CharField(default='', max_length=40)), - ('extra_info', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='EmpConfidentialDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('aadhar_no', models.BigIntegerField(default=0, max_length=12, validators=[django.core.validators.MaxValueValidator(999999999999), django.core.validators.MinValueValidator(99999999999)])), - ('maritial_status', models.CharField(choices=[('MARRIED', 'MARRIED'), ('UN-MARRIED', 'UN-MARRIED'), ('WIDOW', 'WIDOW')], max_length=50)), - ('bank_account_no', models.IntegerField(default=0)), - ('salary', models.IntegerField(default=0)), - ('extra_info', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='EmpAppraisalForm', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('year', models.DateField(blank=True, max_length=6, null=True)), - ('appraisal_form', models.FileField(default=' ', null=True, upload_to='Hr2/appraisal_form')), - ('extra_info', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - ] diff --git a/FusionIIIT/applications/hr2/migrations/__init__.py b/FusionIIIT/applications/hr2/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/income_expenditure/migrations/0001_initial.py b/FusionIIIT/applications/income_expenditure/migrations/0001_initial.py deleted file mode 100644 index 1501efdb9..000000000 --- a/FusionIIIT/applications/income_expenditure/migrations/0001_initial.py +++ /dev/null @@ -1,80 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='BalanceSheet', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('balanceSheet', models.FileField(upload_to='')), - ('date_added', models.CharField(max_length=10)), - ], - ), - migrations.CreateModel( - name='ExpenditureType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('expenditure_type', models.CharField(max_length=100)), - ], - ), - migrations.CreateModel( - name='FixedAttributes', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('attribute', models.CharField(max_length=100)), - ('value', models.IntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='IncomeSource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('income_source', models.CharField(max_length=100)), - ], - ), - migrations.CreateModel( - name='otherExpense', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('spent_on', models.CharField(max_length=100)), - ('status', models.CharField(max_length=20)), - ('name', models.CharField(max_length=30)), - ('userid', models.CharField(max_length=10)), - ('amount', models.IntegerField()), - ('date_added', models.DateField()), - ('remarks', models.CharField(blank=True, max_length=100)), - ], - ), - migrations.CreateModel( - name='Income', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('amount', models.IntegerField()), - ('date_added', models.DateField()), - ('remarks', models.CharField(blank=True, max_length=100)), - ('receipt', models.FileField(blank=True, upload_to='iemodule/income_receipts')), - ('source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='incomeSource', to='income_expenditure.incomesource')), - ], - ), - migrations.CreateModel( - name='Expenditure', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('amount', models.IntegerField()), - ('date_added', models.DateField()), - ('remarks', models.CharField(max_length=100)), - ('expenditure_receipt', models.FileField(upload_to='iemodule/expenditure_receipts')), - ('spent_on', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenditureType', to='income_expenditure.expendituretype')), - ], - ), - ] diff --git a/FusionIIIT/applications/income_expenditure/migrations/__init__.py b/FusionIIIT/applications/income_expenditure/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/iwdModuleV2/migrations/0001_initial.py b/FusionIIIT/applications/iwdModuleV2/migrations/0001_initial.py deleted file mode 100644 index bbde8386c..000000000 --- a/FusionIIIT/applications/iwdModuleV2/migrations/0001_initial.py +++ /dev/null @@ -1,226 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='FinancialBidDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=200)), - ('description', models.CharField(max_length=200)), - ], - ), - migrations.CreateModel( - name='Projects', - fields=[ - ('id', models.CharField(max_length=200, primary_key=True, serialize=False)), - ], - ), - migrations.CreateModel( - name='PageOneDetails', - fields=[ - ('id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='iwdModuleV2.projects')), - ('aESFile', models.FileField(null=True, upload_to='')), - ('dASA', models.DateField(null=True)), - ('nitNiqNo', models.IntegerField(null=True)), - ('proTh', models.CharField(max_length=200, null=True)), - ('emdDetails', models.CharField(max_length=200, null=True)), - ('preBidDate', models.DateField(max_length=200, null=True)), - ('technicalBidDate', models.DateField(null=True)), - ('financialBidDate', models.DateField(null=True)), - ], - ), - migrations.CreateModel( - name='PageThreeDetails', - fields=[ - ('id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='iwdModuleV2.projects')), - ('extensionOfTime', models.FileField(upload_to='')), - ('actualCostOfBuilding', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='PageTwoDetails', - fields=[ - ('id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='iwdModuleV2.projects')), - ('corrigendum', models.FileField(null=True, upload_to='')), - ('addendum', models.FileField(null=True, upload_to='')), - ('preBidMeetingDetails', models.FileField(null=True, upload_to='')), - ('technicalBidMeetingDetails', models.FileField(null=True, upload_to='')), - ('technicallyQualifiedAgencies', models.CharField(max_length=200, null=True)), - ('financialBidMeetingDetails', models.FileField(null=True, upload_to='')), - ('nameOfLowestAgency', models.CharField(max_length=200, null=True)), - ('letterOfIntent', models.FileField(null=True, upload_to='')), - ('workOrder', models.FileField(null=True, upload_to='')), - ('agreementLetter', models.FileField(null=True, upload_to='')), - ('milestones', models.FileField(null=True, upload_to='')), - ], - ), - migrations.CreateModel( - name='WorkOrderForm', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('issueDate', models.DateField()), - ('nitNiqNo', models.IntegerField()), - ('agency', models.CharField(max_length=200)), - ('name', models.CharField(max_length=200)), - ('amount', models.IntegerField()), - ('time', models.IntegerField()), - ('monthDay', models.IntegerField()), - ('startDate', models.DateField()), - ('completionDate', models.DateField()), - ('deposit', models.IntegerField()), - ('contractDay', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='TechnicalBidDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=200)), - ('requirements', models.CharField(max_length=200)), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='TechnicalBidContractorDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('description', models.CharField(max_length=200)), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.technicalbiddetails')), - ], - ), - migrations.CreateModel( - name='PreBidDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=200)), - ('nameOfParticipants', models.CharField(max_length=200)), - ('issuesRaised', models.CharField(max_length=200)), - ('responseDecision', models.CharField(max_length=200)), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='NoOfTechnicalBidTimes', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('number', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='Milestones', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=200)), - ('description', models.CharField(max_length=200)), - ('timeAllowed', models.IntegerField()), - ('amountWithheld', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects')), - ], - ), - migrations.CreateModel( - name='LetterOfIntentDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('nitNiqNo', models.IntegerField()), - ('dateOfOpening', models.DateField()), - ('agency', models.CharField(max_length=200)), - ('name', models.CharField(max_length=200)), - ('tenderValue', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='FinancialContractorDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('estimatedCost', models.IntegerField()), - ('percentageRelCost', models.IntegerField()), - ('perFigures', models.IntegerField()), - ('totalCost', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.financialbiddetails')), - ], - ), - migrations.AddField( - model_name='financialbiddetails', - name='key', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True), - ), - migrations.CreateModel( - name='ExtensionOfTimeDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=200)), - ('hindrance', models.CharField(max_length=200)), - ('periodOfHindrance', models.IntegerField()), - ('periodOfExtension', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects')), - ], - ), - migrations.CreateModel( - name='CorrigendumTable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('issueDate', models.DateField()), - ('nitNo', models.IntegerField()), - ('name', models.CharField(max_length=200)), - ('lastDate', models.DateField(null=True)), - ('lastTime', models.TimeField()), - ('env1BidOpeningDate', models.DateField()), - ('env1BidOpeningTime', models.TimeField()), - ('env2BidOpeningDate', models.DateField()), - ('env2BidOpeningTime', models.TimeField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='Agreement', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('agencyName', models.CharField(max_length=200)), - ('workName', models.CharField(max_length=200)), - ('fdrSum', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - migrations.CreateModel( - name='AESDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sNo', models.CharField(max_length=100)), - ('descOfItems', models.CharField(max_length=200)), - ('unit', models.CharField(max_length=200)), - ('quantity', models.IntegerField()), - ('rate', models.IntegerField()), - ('amount', models.IntegerField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects')), - ], - ), - migrations.CreateModel( - name='Addendum', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('issueDate', models.DateField()), - ('nitNiqNo', models.IntegerField()), - ('name', models.CharField(max_length=200)), - ('openDate', models.DateField()), - ('openTime', models.TimeField()), - ('key', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='iwdModuleV2.projects', unique=True)), - ], - ), - ] diff --git a/FusionIIIT/applications/iwdModuleV2/migrations/__init__.py b/FusionIIIT/applications/iwdModuleV2/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/iwdModuleV2/urls.py b/FusionIIIT/applications/iwdModuleV2/urls.py index 6ad401098..c3ab9169a 100644 --- a/FusionIIIT/applications/iwdModuleV2/urls.py +++ b/FusionIIIT/applications/iwdModuleV2/urls.py @@ -5,8 +5,6 @@ app_name = 'iwdModuleV2' urlpatterns = [ - - url(r'^$', views.dashboard, name='IWD Dashboard'), url(r'^page1_1/$', views.page1_1, name='IWD Page1.1'), url(r'page2_1/$', views.page2_1, name='IWD Page2.1'), diff --git a/FusionIIIT/applications/leave/migrations/0001_initial.py b/FusionIIIT/applications/leave/migrations/0001_initial.py deleted file mode 100644 index d9ce4e044..000000000 --- a/FusionIIIT/applications/leave/migrations/0001_initial.py +++ /dev/null @@ -1,169 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='ClosedHoliday', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ], - ), - migrations.CreateModel( - name='Leave', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('purpose', models.CharField(blank=True, default='', max_length=500)), - ('status', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected')], default='pending', max_length=20)), - ('timestamp', models.DateTimeField(auto_now=True, null=True)), - ('extra_info', models.CharField(blank=True, default='', max_length=200, null=True)), - ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_leaves', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveOffline', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('purpose', models.CharField(blank=True, default='', max_length=500)), - ('timestamp', models.DateTimeField(auto_now=True, null=True)), - ('application_date', models.DateField()), - ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_leaves_offline', to=settings.AUTH_USER_MODEL)), - ('leave_user_select', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=40)), - ('max_in_year', models.IntegerField(default=2)), - ('requires_proof', models.BooleanField(default=False)), - ('authority_forwardable', models.BooleanField(default=False)), - ('for_faculty', models.BooleanField(default=True)), - ('for_staff', models.BooleanField(default=True)), - ('for_student', models.BooleanField(default=False)), - ('requires_address', models.BooleanField(default=False)), - ], - ), - migrations.CreateModel( - name='RestrictedHoliday', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ], - ), - migrations.CreateModel( - name='VacationHoliday', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ], - ), - migrations.CreateModel( - name='ReplacementSegmentOffline', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('replacement_type', models.CharField(choices=[('academic', 'Academic Replacement'), ('administrative', 'Administrative Replacement')], default='academic', max_length=20)), - ('start_date', models.DateField()), - ('end_date', models.DateField()), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='replace_segments_offline', to='leave.leaveoffline')), - ('replacer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rep_requests_offline', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='ReplacementSegment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('replacement_type', models.CharField(choices=[('academic', 'Academic Replacement'), ('administrative', 'Administrative Replacement')], default='academic', max_length=20)), - ('start_date', models.DateField()), - ('end_date', models.DateField()), - ('status', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected')], default='pending', max_length=20)), - ('remark', models.CharField(blank=True, default='', max_length=50, null=True)), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='replace_segments', to='leave.leave')), - ('replacer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rep_requests', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveSegmentOffline', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', models.FileField(null=True, upload_to='leave/leave_documents/')), - ('start_date', models.DateField()), - ('start_half', models.BooleanField(default=False)), - ('end_date', models.DateField()), - ('end_half', models.BooleanField(default=False)), - ('address', models.CharField(blank=True, default='', max_length=500, null=True)), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='segments_offline', to='leave.leaveoffline')), - ('leave_type', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='leave.leavetype')), - ], - ), - migrations.CreateModel( - name='LeaveSegment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', models.FileField(null=True, upload_to='leave/leave_documents/')), - ('start_date', models.DateField()), - ('start_half', models.BooleanField(default=False)), - ('end_date', models.DateField()), - ('end_half', models.BooleanField(default=False)), - ('address', models.CharField(blank=True, default='', max_length=500, null=True)), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='segments', to='leave.leave')), - ('leave_type', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='leave.leavetype')), - ], - ), - migrations.CreateModel( - name='LeavesCount', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('year', models.IntegerField(default=2019)), - ('remaining_leaves', models.FloatField(default=2.0)), - ('leave_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='leave.leavetype')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leave_balance', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveRequest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('remark', models.CharField(blank=True, max_length=50, null=True)), - ('permission', models.CharField(choices=[('intermediary', 'Intermediary Staff'), ('sanc_auth', 'Leave Sanctioning Authority'), ('sanc_off', 'Leave Sanctioning Officer')], default='sanc_auth', max_length=20)), - ('status', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('forwarded', 'Forwarded'), ('auto rejected', 'Auto Rejected')], default='pending', max_length=20)), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leave_requests', to='leave.leave')), - ('requested_from', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_leave_requests', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveMigration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('type_migration', models.CharField(choices=[('revert', 'Revert Responsibilities'), ('transfer', 'Transfer Responsibilities')], default='transfer', max_length=10)), - ('on_date', models.DateField()), - ('replacement_type', models.CharField(choices=[('academic', 'Academic Replacement'), ('administrative', 'Administrative Replacement')], default='academic', max_length=20)), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='all_migrations', to='leave.leave')), - ('replacee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='replacee_migrations', to=settings.AUTH_USER_MODEL)), - ('replacer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='replacer_migrations', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='LeaveAdministrators', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('authority', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sanc_authority_of', to='globals.designation')), - ('officer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sanc_officer_of', to='globals.designation')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='leave_admins', to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/FusionIIIT/applications/leave/migrations/__init__.py b/FusionIIIT/applications/leave/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/notifications_extension/migrations/__init__.py b/FusionIIIT/applications/notifications_extension/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/office_module/migrations/0001_initial.py b/FusionIIIT/applications/office_module/migrations/0001_initial.py deleted file mode 100644 index 521c8e886..000000000 --- a/FusionIIIT/applications/office_module/migrations/0001_initial.py +++ /dev/null @@ -1,492 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ('filetracking', '0001_initial'), - ('leave', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Budget', - fields=[ - ('id', models.AutoField(primary_key=True, serialize=False)), - ('budget_type', models.CharField(max_length=20)), - ('club_type', models.CharField(choices=[('TECHNICAL', 'technical'), ('CULTURAL', 'cultural'), ('SPORTS', 'sports')], default='', max_length=20)), - ('budget_allocated', models.PositiveIntegerField(default=0)), - ('budget_expenditure', models.PositiveIntegerField(default=0)), - ('budget_available', models.PositiveIntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='hostel_allotment', - fields=[ - ('id', models.AutoField(primary_key=True, serialize=False)), - ('program', models.CharField(choices=[('BTECH', 'btech'), ('BDES', 'bdes'), ('MTECH', 'mtech'), ('MDES', 'mdes'), ('PHD', 'phd')], default='', max_length=30)), - ('year', models.IntegerField(default=2016)), - ('gender', models.CharField(choices=[('MALE', 'male'), ('FEMALE', 'female')], default='', max_length=10)), - ('hall_no', models.CharField(choices=[('HALL-1-BOYS', 'hall-1-boys'), ('HALL-1-GIRLS', 'hall-1-girls'), ('HALL-3', 'hall-3'), ('HALL-4', 'hall-4')], default='', max_length=15)), - ('number_students', models.PositiveIntegerField(default=0)), - ('remark', models.CharField(max_length=200)), - ], - options={ - 'db_table': 'hostel_allotment', - }, - ), - migrations.CreateModel( - name='hostel_capacity', - fields=[ - ('id', models.AutoField(primary_key=True, serialize=False)), - ('name', models.CharField(choices=[('HALL-1-BOYS', 'hall-1-boys'), ('HALL-1-GIRLS', 'hall-1-girls'), ('HALL-3', 'hall-3'), ('HALL-4', 'hall-4')], default='', max_length=15)), - ('current_capacity', models.PositiveIntegerField(default=0)), - ('total_capacity', models.PositiveIntegerField(default=0)), - ], - options={ - 'db_table': 'hostel_capacity', - }, - ), - migrations.CreateModel( - name='Lab', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('lab', models.CharField(max_length=10)), - ('lab_instructor', models.CharField(max_length=30)), - ('day', models.CharField(choices=[('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday', 'Wednesday'), ('Thursday', 'Thursday'), ('Friday', 'Friday')], default='Monday', max_length=10)), - ('s_time', models.CharField(default='0:00', max_length=6)), - ('e_time', models.CharField(default='0:00', max_length=6)), - ], - options={ - 'db_table': 'Lab', - }, - ), - migrations.CreateModel( - name='quotations', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quotation1', models.FileField(upload_to='')), - ('quotation2', models.FileField(upload_to='')), - ('quotation3', models.FileField(upload_to='')), - ], - options={ - 'db_table': 'quotations', - }, - ), - migrations.CreateModel( - name='Registrar', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('date', models.DateField()), - ('purpose', models.CharField(max_length=100)), - ('status', models.CharField(choices=[('0', 'unseen'), ('1', 'seen')], default=0, max_length=1)), - ('file', models.FileField(upload_to='')), - ], - ), - migrations.CreateModel( - name='registrar_create_doc', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('purpose', models.CharField(max_length=100)), - ('Description', models.CharField(max_length=200)), - ('file', models.FileField(upload_to='')), - ], - ), - migrations.CreateModel( - name='registrar_director_section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('date', models.DateField()), - ('purpose', models.CharField(max_length=100)), - ('status', models.CharField(choices=[('0', 'unseen'), ('1', 'seen')], default=0, max_length=1)), - ], - ), - migrations.CreateModel( - name='registrar_establishment_section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('person_name', models.CharField(max_length=50)), - ('person_mail_id', models.CharField(default='xyz', max_length=50)), - ('date', models.DateField()), - ('duration', models.IntegerField()), - ('post', models.CharField(max_length=100)), - ('file', models.FileField(upload_to='')), - ], - ), - migrations.CreateModel( - name='registrar_finance_section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('date', models.DateField()), - ('purpose', models.CharField(max_length=100)), - ('status', models.IntegerField(choices=[('0', 'unseen'), ('1', 'seen')])), - ('file', models.FileField(upload_to='')), - ], - ), - migrations.CreateModel( - name='registrar_purchase_sales_section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('member1', models.CharField(max_length=50)), - ('member2', models.CharField(max_length=50)), - ('member3', models.CharField(max_length=50)), - ('date', models.DateField()), - ('purpose', models.CharField(max_length=100)), - ('status', models.IntegerField(choices=[('0', 'unseen'), ('1', 'seen')], default=0)), - ('file', models.FileField(upload_to='')), - ], - ), - migrations.CreateModel( - name='stock', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('item_name', models.CharField(max_length=100)), - ('quantity', models.IntegerField(default='0')), - ('item_type', models.IntegerField(choices=[('0', 'Non-consumable'), ('1', 'Consumable')], default='0')), - ], - options={ - 'db_table': 'stock', - }, - ), - migrations.CreateModel( - name='Teaching_credits1', - fields=[ - ('roll_no', models.CharField(max_length=100, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=100)), - ('programme', models.CharField(max_length=100)), - ('branch', models.CharField(max_length=100)), - ('course1', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='NO', max_length=100)), - ('course2', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='NO', max_length=100)), - ('course3', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='NO', max_length=100)), - ('tag', models.IntegerField(default=0)), - ], - options={ - 'db_table': 'Teaching_credits1', - }, - ), - migrations.CreateModel( - name='vendor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('vendor_name', models.CharField(max_length=100)), - ('vendor_address', models.CharField(max_length=200)), - ('vendor_item', models.CharField(max_length=200)), - ], - options={ - 'db_table': 'vendor', - }, - ), - migrations.CreateModel( - name='TA_assign', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('balance', models.IntegerField(default=2)), - ('lab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.lab')), - ('roll_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='TA_id', to='globals.extrainfo')), - ], - options={ - 'db_table': 'TA_assign', - }, - ), - migrations.CreateModel( - name='Requisitions', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('req_date', models.DateTimeField(auto_now_add=True)), - ('title', models.CharField(max_length=50)), - ('department', models.CharField(choices=[('civil', 'civil'), ('electrical', 'electrical')], max_length=50)), - ('building', models.CharField(choices=[('corelab', 'corelab'), ('computer center', 'computer center'), ('hostel', 'hostel'), ('mess', 'mess'), ('library', 'library'), ('cc', 'cc')], max_length=50)), - ('description', models.CharField(max_length=200)), - ('tag', models.IntegerField(default=0)), - ('assign_file', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='filetracking.file')), - ('userid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Registrar_response', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('remark', models.CharField(default='', max_length=50)), - ('status', models.CharField(default='', max_length=20)), - ('track_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='t_id', to='filetracking.tracking')), - ], - options={ - 'db_table': 'Registrar_response', - }, - ), - migrations.CreateModel( - name='registrar_general_section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file_name', models.CharField(max_length=50)), - ('date', models.DateField()), - ('amount', models.IntegerField()), - ('status', models.IntegerField(choices=[('0', 'unseen'), ('1', 'seen')], default=0)), - ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.registrar_create_doc')), - ], - ), - migrations.CreateModel( - name='Registrar_File', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', models.IntegerField(choices=[('0', 'unseen'), ('1', 'seen')], default=0)), - ('approval', models.IntegerField(choices=[('0', 'reject'), ('1', 'accept')], default=0)), - ('section_name', models.CharField(max_length=50)), - ('section_type', models.CharField(max_length=20)), - ('file_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='filetracking.tracking')), - ], - ), - migrations.CreateModel( - name='purchase_commitee', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('approve_mem1', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default='0')), - ('approve_mem2', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default='0')), - ('approve_mem3', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default='0')), - ('local_comm_mem1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='local_comm_mem1', to='globals.extrainfo')), - ('local_comm_mem2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='local_comm_mem2', to='globals.extrainfo')), - ('local_comm_mem3', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='local_comm_mem3', to='globals.extrainfo')), - ], - options={ - 'db_table': 'purchase_commitee', - }, - ), - migrations.CreateModel( - name='Project_Registration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('project_title', models.CharField(max_length=200)), - ('sponsored_agency', models.CharField(max_length=100)), - ('CO_PI', models.CharField(max_length=100, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('duration', models.IntegerField(default=0)), - ('agreement', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='NO', max_length=20)), - ('amount_sanctioned', models.IntegerField(default=0)), - ('project_type', models.CharField(choices=[('SRes', 'Sponsored Research'), ('Consultancy', 'Consultancy'), ('fig', 'Faculty Initiation Grant'), ('Testing', 'Testing')], max_length=25)), - ('project_operated', models.CharField(choices=[('PI', 'Only by PI'), ('any', 'Either PI or CO-PI')], default='me', max_length=50)), - ('remarks', models.CharField(max_length=200)), - ('fund_recieved_date', models.DateField(blank=True, null=True)), - ('HOD_response', models.CharField(choices=[('Forwarded', 'Forwarded'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('DRSPC_response', models.CharField(choices=[('Approve', 'Approve'), ('Disapprove', 'Disapprove'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('applied_date', models.DateField(blank=True, null=True)), - ('description', models.CharField(max_length=200, null=True)), - ('file', models.FileField(blank=True, null=True, upload_to='documents/')), - ('PI_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Project_Reallocation', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField(blank=True, null=True)), - ('previous_budget_head', models.CharField(max_length=300)), - ('previous_amount', models.IntegerField(default=0)), - ('pf_no', models.CharField(max_length=100, null=True)), - ('new_budget_head', models.CharField(max_length=300)), - ('new_amount', models.IntegerField(default=0)), - ('transfer_reason', models.CharField(max_length=300)), - ('HOD_response', models.CharField(choices=[('Forwarded', 'Forwarded'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('DRSPC_response', models.CharField(choices=[('Approve', 'Approve'), ('Disapprove', 'Disapprove'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.project_registration')), - ], - ), - migrations.CreateModel( - name='Project_Extension', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField(blank=True, null=True)), - ('extended_duration', models.IntegerField(default=0)), - ('extension_details', models.CharField(max_length=300)), - ('HOD_response', models.CharField(choices=[('Forwarded', 'Forwarded'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('DRSPC_response', models.CharField(choices=[('Approve', 'Approve'), ('Disapprove', 'Disapprove'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('file', models.FileField(blank=True, null=True, upload_to='documents/')), - ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.project_registration')), - ], - ), - migrations.CreateModel( - name='Project_Closure', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('completion_date', models.DateField(blank=True, null=True)), - ('date', models.DateField(blank=True, null=True)), - ('expenses_dues', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('expenses_dues_description', models.CharField(blank=True, max_length=200, null=True)), - ('payment_dues', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('payment_dues_description', models.CharField(blank=True, max_length=200, null=True)), - ('salary_dues', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('salary_dues_description', models.CharField(blank=True, max_length=200, null=True)), - ('advances_dues', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('advances_description', models.CharField(blank=True, max_length=200, null=True)), - ('others_dues', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('other_dues_description', models.CharField(blank=True, max_length=200, null=True)), - ('overhead_deducted', models.CharField(choices=[('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing', 'Image Processing'), ('Data Structure', 'Data Structure')], default='Pending', max_length=20)), - ('overhead_description', models.CharField(blank=True, max_length=200, null=True)), - ('HOD_response', models.CharField(choices=[('Forwarded', 'Forwarded'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('DRSPC_response', models.CharField(choices=[('Approve', 'Approve'), ('Disapprove', 'Disapprove'), ('Pending', 'Pending')], default='Pending', max_length=10)), - ('remarks', models.CharField(max_length=300, null=True)), - ('extended_duration', models.CharField(default='0', max_length=100, null=True)), - ('project_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.project_registration')), - ], - ), - migrations.CreateModel( - name='LTC', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date_request', models.DateField()), - ('travel_mode', models.CharField(choices=[('road', 'ROAD'), ('rail', 'RAIL')], default='ROAD', max_length=10)), - ('advance', models.IntegerField(default=0)), - ('family_details', models.TextField(max_length=500)), - ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.departmentinfo')), - ('designation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.designation')), - ('leave', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='leave.leave')), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'LTC', - }, - ), - migrations.CreateModel( - name='hostel_guestroom_approval', - fields=[ - ('id', models.AutoField(primary_key=True, serialize=False)), - ('hall_no', models.CharField(choices=[('HALL-1-BOYS', 'hall-1-boys'), ('HALL-1-GIRLS', 'hall-1-girls'), ('HALL-3', 'hall-3'), ('HALL-4', 'hall-4')], default='', max_length=16)), - ('arrival_date', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('departure_date', models.DateField(blank=True, null=True)), - ('status', models.CharField(choices=[('APPROVED', 'Approved'), ('PENDING', 'Pending')], default='Pending', max_length=20)), - ('intender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='Filemovement', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateTimeField(auto_now_add=True)), - ('remarks', models.CharField(max_length=200, null=True)), - ('actionby_receiver', models.CharField(choices=[('forward', 'forwarded'), ('revert', 'revert'), ('accept', 'accept'), ('reject', 'reject')], max_length=50)), - ('receivedby', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='received_by', to='globals.holdsdesignation')), - ('rid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.requisitions')), - ('sentby', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sent_by', to='globals.holdsdesignation')), - ], - ), - migrations.CreateModel( - name='DeanS_approve_committes', - fields=[ - ('id', models.AutoField(primary_key=True, serialize=False)), - ('date_approved', models.DateField(blank=True, null=True)), - ('description', models.CharField(max_length=200)), - ('convener', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='convener', to='globals.extrainfo')), - ('faculty_incharge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='facultyincharge', to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='CPDA', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('PF_no', models.CharField(max_length=100)), - ('purpose', models.CharField(max_length=100)), - ('amoutn', models.IntegerField(default=0)), - ('designation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.designation')), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'CPDA', - }, - ), - migrations.CreateModel( - name='Auto_fair_claim', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('purpose', models.CharField(max_length=100)), - ('amount', models.IntegerField(default=0)), - ('auto_reg_no', models.CharField(max_length=50)), - ('auto_contact', models.IntegerField(default=0)), - ('bill', models.FileField(upload_to='hod/')), - ('date', models.DateField()), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'auto_fair_claim', - }, - ), - migrations.CreateModel( - name='Assigned_Teaching_credits', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('assigned_course', models.CharField(default='NO', max_length=100)), - ('roll_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='office_module.teaching_credits1')), - ], - options={ - 'db_table': 'Assigned_Teaching_credits', - }, - ), - migrations.CreateModel( - name='apply_for_purchase', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('inspecting_authority', models.CharField(default='0', max_length=200)), - ('expected_purchase_date', models.DateField()), - ('order_date', models.DateField(default=datetime.date.today)), - ('purchase_status', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('2', 'Items Ordered'), ('3', 'Items Puchased'), ('4', 'Items Delivered')], default=0)), - ('amount', models.IntegerField(default='0')), - ('purchase_date', models.DateField(default='2018-06-01')), - ('registrar_approve_tag', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default=0)), - ('director_approve_tag', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default=0)), - ('HOD_approve_tag', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default=0)), - ('accounts_approve_tag', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default=0)), - ('gem_tag', models.IntegerField(choices=[('0', 'Pending'), ('1', 'Approve'), ('-1', 'Rejected')], default=0)), - ('purchase_type', models.IntegerField(choices=[('0', 'Amount < 25000'), ('1', '250002500000')], default=0)), - ('purpose', models.CharField(default=0, max_length=200)), - ('budgetary_head', models.CharField(default=0, max_length=200)), - ('invoice', models.FileField(default=0, upload_to='')), - ('nature_of_item1', models.IntegerField(choices=[('0', 'Non-consumable'), ('1', 'Consumable')], default=0)), - ('nature_of_item2', models.IntegerField(choices=[('0', 'Equipment'), ('1', 'Machinery'), ('2', 'Furniture'), ('3', 'Fixture')], default=0)), - ('item_name', models.CharField(default=0, max_length=100)), - ('expected_cost', models.IntegerField(default=0)), - ('quantity', models.IntegerField(default=0)), - ('indentor_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='indentor_name', to='globals.extrainfo')), - ], - options={ - 'db_table': 'apply_for_purchase', - }, - ), - migrations.CreateModel( - name='Member', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meeting_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.meeting')), - ('member_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.faculty')), - ], - options={ - 'db_table': 'Member', - 'unique_together': {('member_id', 'meeting_id')}, - }, - ), - migrations.CreateModel( - name='Assistantship', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('file', models.FileField(blank=True, null=True, upload_to='documents/')), - ('action', models.IntegerField(default=0)), - ('comments', models.CharField(blank=True, max_length=150, null=True)), - ('instructor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.curriculum_instructor')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Assistantship', - 'unique_together': {('student_id', 'instructor_id')}, - }, - ), - ] diff --git a/FusionIIIT/applications/office_module/migrations/__init__.py b/FusionIIIT/applications/office_module/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/online_cms/migrations/0001_initial.py b/FusionIIIT/applications/online_cms/migrations/0001_initial.py deleted file mode 100644 index 4e3377ab7..000000000 --- a/FusionIIIT/applications/online_cms/migrations/0001_initial.py +++ /dev/null @@ -1,196 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Assignment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_time', models.DateTimeField(auto_now=True)), - ('submit_date', models.DateTimeField()), - ('assignment_name', models.CharField(max_length=100)), - ('assignment_url', models.CharField(max_length=100, null=True)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='Forum', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('comment_time', models.DateTimeField(auto_now=True)), - ('comment', models.TextField(max_length=2000)), - ('commenter_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='Practice', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('prac_quiz_name', models.CharField(max_length=20)), - ('negative_marks', models.FloatField(default=0)), - ('number_of_question', models.IntegerField(default=0)), - ('description', models.TextField(max_length=1000)), - ('total_score', models.IntegerField(default=0)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='Question', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('question', models.TextField(max_length=1000)), - ('options1', models.CharField(max_length=100, null=True)), - ('options2', models.CharField(max_length=100, null=True)), - ('options3', models.CharField(max_length=100, null=True)), - ('options4', models.CharField(max_length=100, null=True)), - ('options5', models.CharField(max_length=100, null=True)), - ('answer', models.IntegerField()), - ('image', models.TextField(max_length=1000, null=True)), - ('marks', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='Quiz', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quiz_name', models.CharField(max_length=20)), - ('end_time', models.DateTimeField()), - ('start_time', models.DateTimeField()), - ('d_day', models.CharField(max_length=2)), - ('d_hour', models.CharField(max_length=2)), - ('d_minute', models.CharField(max_length=2)), - ('negative_marks', models.FloatField(default=0)), - ('number_of_question', models.IntegerField(default=0)), - ('description', models.TextField(max_length=1000)), - ('rules', models.TextField(max_length=2000)), - ('total_score', models.IntegerField(default=0)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='QuizQuestion', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.question')), - ('quiz_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.quiz')), - ], - ), - migrations.CreateModel( - name='Topics', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('topic_name', models.TextField(max_length=200)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='StudentAssignment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_time', models.DateTimeField(auto_now=True)), - ('upload_url', models.TextField(max_length=200)), - ('score', models.IntegerField(null=True)), - ('feedback', models.CharField(max_length=100, null=True)), - ('assign_name', models.CharField(max_length=100)), - ('assignment_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.assignment')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='StudentAnswer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('choice', models.IntegerField()), - ('question_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.quizquestion')), - ('quiz_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.quiz')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='QuizResult', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('score', models.IntegerField()), - ('finished', models.BooleanField(default=False)), - ('quiz_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.quiz')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='QuestionBank', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ('instructor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.AddField( - model_name='question', - name='question_bank', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.questionbank'), - ), - migrations.AddField( - model_name='question', - name='topic', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.topics'), - ), - migrations.CreateModel( - name='PracticeQuestion', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('question', models.TextField(max_length=1000)), - ('options1', models.CharField(max_length=100, null=True)), - ('options2', models.CharField(max_length=100, null=True)), - ('options3', models.CharField(max_length=100, null=True)), - ('options4', models.CharField(max_length=100, null=True)), - ('options5', models.CharField(max_length=100, null=True)), - ('answer', models.IntegerField()), - ('image', models.TextField(max_length=1000, null=True)), - ('prac_quiz_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online_cms.practice')), - ], - ), - migrations.CreateModel( - name='ForumReply', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('forum_ques', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='forum_ques', to='online_cms.forum')), - ('forum_reply', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='forum_reply', to='online_cms.forum')), - ], - ), - migrations.CreateModel( - name='CourseVideo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_time', models.DateTimeField(auto_now=True)), - ('description', models.CharField(max_length=100)), - ('video_name', models.CharField(max_length=40)), - ('video_url', models.CharField(max_length=100, null=True)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - migrations.CreateModel( - name='CourseDocuments', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('upload_time', models.DateTimeField(auto_now=True)), - ('description', models.CharField(max_length=100)), - ('document_name', models.CharField(max_length=40)), - ('document_url', models.CharField(max_length=100, null=True)), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.course')), - ], - ), - ] diff --git a/FusionIIIT/applications/online_cms/migrations/__init__.py b/FusionIIIT/applications/online_cms/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/placement_cell/migrations/0001_initial.py b/FusionIIIT/applications/placement_cell/migrations/0001_initial.py deleted file mode 100644 index 257c98609..000000000 --- a/FusionIIIT/applications/placement_cell/migrations/0001_initial.py +++ /dev/null @@ -1,289 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='ChairmanVisit', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('company_name', models.CharField(default='', max_length=100)), - ('location', models.CharField(default='', max_length=100)), - ('visiting_date', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('description', models.TextField(blank=True, default='', max_length=1000, null=True)), - ('timestamp', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='CompanyDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('company_name', models.CharField(blank=True, max_length=100, null=True)), - ], - ), - migrations.CreateModel( - name='MessageOfficer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('message', models.CharField(default='', max_length=100)), - ('timestamp', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='NotifyStudent', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('placement_type', models.CharField(choices=[('PLACEMENT', 'Placement'), ('PBI', 'PBI'), ('HIGHER STUDIES', 'Higher Studies'), ('OTHER', 'Other')], default='PLACEMENT', max_length=20)), - ('company_name', models.CharField(default='', max_length=100)), - ('ctc', models.DecimalField(decimal_places=4, max_digits=10)), - ('description', models.TextField(blank=True, default='', max_length=1000, null=True)), - ('timestamp', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='PlacementRecord', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('placement_type', models.CharField(choices=[('PLACEMENT', 'Placement'), ('PBI', 'PBI'), ('HIGHER STUDIES', 'Higher Studies'), ('OTHER', 'Other')], default='PLACEMENT', max_length=20)), - ('name', models.CharField(default='', max_length=100)), - ('ctc', models.DecimalField(decimal_places=2, default=0, max_digits=5)), - ('year', models.IntegerField(default=0)), - ('test_score', models.IntegerField(blank=True, default=0, null=True)), - ('test_type', models.CharField(blank=True, default='', max_length=30, null=True)), - ], - ), - migrations.CreateModel( - name='Role', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('role', models.CharField(blank=True, max_length=100, null=True)), - ], - ), - migrations.CreateModel( - name='Skill', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('skill', models.CharField(default='', max_length=30)), - ], - ), - migrations.CreateModel( - name='StudentPlacement', - fields=[ - ('unique_id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='academic_information.student')), - ('debar', models.CharField(choices=[('NOT DEBAR', 'Not Debar'), ('DEBAR', 'Debar')], default='NOT DEBAR', max_length=20)), - ('future_aspect', models.CharField(choices=[('PLACEMENT', 'Placement'), ('PBI', 'PBI'), ('HIGHER STUDIES', 'Higher Studies'), ('OTHER', 'Other')], default='PLACEMENT', max_length=20)), - ('placed_type', models.CharField(choices=[('NOT PLACED', 'Not Placed'), ('PLACED', 'Placed')], default='NOT PLACED', max_length=20)), - ('placement_date', models.DateField(blank=True, default=datetime.date.today, null=True, verbose_name='Date')), - ('package', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True)), - ], - ), - migrations.CreateModel( - name='Reference', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('reference_name', models.CharField(default='', max_length=100)), - ('post', models.CharField(blank=True, default='', max_length=100, null=True)), - ('email', models.CharField(default='', max_length=50)), - ('mobile_number', models.CharField(blank=True, max_length=15, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Publication', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('publication_title', models.CharField(default='', max_length=100)), - ('description', models.TextField(blank=True, default='', max_length=250, null=True)), - ('publisher', models.TextField(default='', max_length=250)), - ('publication_date', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Project', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('project_name', models.CharField(default='', max_length=50)), - ('project_status', models.CharField(choices=[('ONGOING', 'Ongoing'), ('COMPLETED', 'Completed')], default='COMPLETED', max_length=20)), - ('summary', models.TextField(blank=True, default='', max_length=1000, null=True)), - ('project_link', models.CharField(blank=True, default='', max_length=200, null=True)), - ('sdate', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('edate', models.DateField(blank=True, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='PlacementSchedule', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(default='', max_length=100)), - ('placement_date', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('location', models.CharField(default='', max_length=100)), - ('description', models.TextField(blank=True, default='', max_length=500, null=True)), - ('time', models.TimeField()), - ('attached_file', models.FileField(blank=True, null=True, upload_to='documents/placement/schedule')), - ('schedule_at', models.DateTimeField(blank=True, default=django.utils.timezone.now, null=True)), - ('notify_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.notifystudent')), - ('role', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='placement_cell.role')), - ], - ), - migrations.CreateModel( - name='Patent', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('patent_name', models.CharField(default='', max_length=100)), - ('description', models.TextField(blank=True, default='', max_length=250, null=True)), - ('patent_office', models.TextField(default='', max_length=250)), - ('patent_date', models.DateField()), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Interest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('interest', models.CharField(default='', max_length=100)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Extracurricular', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('event_name', models.CharField(default='', max_length=100)), - ('event_type', models.CharField(choices=[('SOCIAL', 'Social'), ('CULTURE', 'Culture'), ('SPORT', 'Sport'), ('OTHER', 'Other')], default='OTHER', max_length=20)), - ('description', models.TextField(blank=True, default='', max_length=1000, null=True)), - ('name_of_position', models.CharField(default='', max_length=200)), - ('date_earned', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Experience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(default='', max_length=100)), - ('status', models.CharField(choices=[('ONGOING', 'Ongoing'), ('COMPLETED', 'Completed')], default='COMPLETED', max_length=20)), - ('description', models.TextField(blank=True, default='', max_length=500, null=True)), - ('company', models.CharField(default='', max_length=200)), - ('location', models.CharField(default='', max_length=200)), - ('sdate', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('edate', models.DateField(blank=True, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Education', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('degree', models.CharField(default='', max_length=40)), - ('grade', models.CharField(default='', max_length=10)), - ('institute', models.TextField(default='', max_length=250)), - ('stream', models.CharField(blank=True, default='', max_length=150, null=True)), - ('sdate', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('edate', models.DateField(blank=True, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Course', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course_name', models.CharField(default='', max_length=100)), - ('description', models.TextField(blank=True, default='', max_length=250, null=True)), - ('license_no', models.CharField(blank=True, default='', max_length=100, null=True)), - ('sdate', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('edate', models.DateField(blank=True, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Conference', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('conference_name', models.CharField(default='', max_length=100)), - ('description', models.TextField(blank=True, default='', max_length=250, null=True)), - ('sdate', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('edate', models.DateField(blank=True, null=True)), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='Coinventor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('coinventor_name', models.CharField(default='', max_length=100)), - ('patent_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.patent')), - ], - ), - migrations.CreateModel( - name='Coauthor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('coauthor_name', models.CharField(default='', max_length=100)), - ('publication_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.publication')), - ], - ), - migrations.CreateModel( - name='Achievement', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('achievement', models.CharField(default='', max_length=100)), - ('achievement_type', models.CharField(choices=[('EDUCATIONAL', 'Educational'), ('OTHER', 'Other')], default='OTHER', max_length=20)), - ('description', models.TextField(blank=True, default='', max_length=1000, null=True)), - ('issuer', models.CharField(default='', max_length=200)), - ('date_earned', models.DateField(default=datetime.date.today, verbose_name='Date')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - ), - migrations.CreateModel( - name='StudentRecord', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('record_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.placementrecord')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('record_id', 'unique_id')}, - }, - ), - migrations.CreateModel( - name='PlacementStatus', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('invitation', models.CharField(choices=[('ACCEPTED', 'Accepted'), ('REJECTED', 'Rejected'), ('PENDING', 'Pending'), ('IGNORE', 'IGNORE')], default='PENDING', max_length=20)), - ('placed', models.CharField(choices=[('NOT PLACED', 'Not Placed'), ('PLACED', 'Placed')], default='NOT PLACED', max_length=20)), - ('timestamp', models.DateTimeField(auto_now=True)), - ('no_of_days', models.IntegerField(blank=True, default=10, null=True)), - ('notify_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.notifystudent')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('notify_id', 'unique_id')}, - }, - ), - migrations.CreateModel( - name='Has', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('skill_rating', models.IntegerField(default=80)), - ('skill_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement_cell.skill')), - ('unique_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'unique_together': {('skill_id', 'unique_id')}, - }, - ), - ] diff --git a/FusionIIIT/applications/placement_cell/migrations/__init__.py b/FusionIIIT/applications/placement_cell/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/programme_curriculum/migrations/0001_initial.py b/FusionIIIT/applications/programme_curriculum/migrations/0001_initial.py deleted file mode 100644 index b01ec58a7..000000000 --- a/FusionIIIT/applications/programme_curriculum/migrations/0001_initial.py +++ /dev/null @@ -1,142 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Curriculum', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('version', models.PositiveIntegerField(default=1)), - ('working_curriculum', models.BooleanField(default=True)), - ('no_of_semester', models.PositiveIntegerField(default=1)), - ('min_credit', models.PositiveIntegerField(default=0)), - ], - ), - migrations.CreateModel( - name='Programme', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('category', models.CharField(choices=[('UG', 'Undergraduate'), ('PG', 'Postgraduate'), ('PHD', 'Doctor of Philosophy')], max_length=3)), - ('name', models.CharField(max_length=70, unique=True)), - ('programme_begin_year', models.PositiveIntegerField(default=2023)), - ], - ), - migrations.CreateModel( - name='Semester', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester_no', models.PositiveIntegerField()), - ('instigate_semester', models.BooleanField(default=False, null=True)), - ('start_semester', models.DateField(blank=True, null=True)), - ('end_semester', models.DateField(blank=True, null=True)), - ('semester_info', models.TextField(blank=True, null=True)), - ('curriculum', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.curriculum')), - ], - options={ - 'unique_together': {('curriculum', 'semester_no')}, - }, - ), - migrations.CreateModel( - name='Discipline', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100, unique=True)), - ('acronym', models.CharField(default='', max_length=10)), - ('programmes', models.ManyToManyField(blank=True, to='programme_curriculum.Programme')), - ], - ), - migrations.AddField( - model_name='curriculum', - name='programme', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.programme'), - ), - migrations.CreateModel( - name='Course', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('code', models.CharField(max_length=10, unique=True)), - ('name', models.CharField(max_length=100, unique=True)), - ('credit', models.PositiveIntegerField(default=0)), - ('lecture_hours', models.PositiveIntegerField(null=True)), - ('tutorial_hours', models.PositiveIntegerField(null=True)), - ('pratical_hours', models.PositiveIntegerField(null=True)), - ('discussion_hours', models.PositiveIntegerField(null=True)), - ('project_hours', models.PositiveIntegerField(null=True)), - ('pre_requisits', models.TextField(blank=True, null=True)), - ('syllabus', models.TextField()), - ('percent_quiz_1', models.PositiveIntegerField(default=10)), - ('percent_midsem', models.PositiveIntegerField(default=20)), - ('percent_quiz_2', models.PositiveIntegerField(default=10)), - ('percent_endsem', models.PositiveIntegerField(default=30)), - ('percent_project', models.PositiveIntegerField(default=15)), - ('percent_lab_evaluation', models.PositiveIntegerField(default=10)), - ('percent_course_attendance', models.PositiveIntegerField(default=5)), - ('ref_books', models.TextField()), - ('working_course', models.BooleanField(default=True)), - ('disciplines', models.ManyToManyField(blank=True, to='programme_curriculum.Discipline')), - ('pre_requisit_courses', models.ManyToManyField(blank=True, related_name='_course_pre_requisit_courses_+', to='programme_curriculum.Course')), - ], - options={ - 'unique_together': {('code', 'name')}, - }, - ), - migrations.CreateModel( - name='Batch', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(choices=[('B.Tech', 'B.Tech'), ('M.Tech', 'M.Tech'), ('B.Des', 'B.Des'), ('M.Des', 'M.Des'), ('Phd', 'Phd')], max_length=50)), - ('year', models.PositiveIntegerField(default=2023)), - ('running_batch', models.BooleanField(default=True)), - ('curriculum', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='programme_curriculum.curriculum')), - ('discipline', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.discipline')), - ], - options={ - 'unique_together': {('name', 'discipline', 'year')}, - }, - ), - migrations.AlterUniqueTogether( - name='curriculum', - unique_together={('name', 'version')}, - ), - migrations.CreateModel( - name='CourseSlot', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('type', models.CharField(choices=[('Professional Core', 'Professional Core'), ('Professional Elective', 'Professional Elective'), ('Professional Lab', 'Professional Lab'), ('Engineering Science', 'Engineering Science'), ('Natural Science', 'Natural Science'), ('Humanities', 'Humanities'), ('Design', 'Design'), ('Manufacturing', 'Manufacturing'), ('Management Science', 'Management Science'), ('Optional Elective', 'Optional Elective'), ('Project', 'Project'), ('Optional', 'Optional'), ('Others', 'Others')], max_length=70)), - ('course_slot_info', models.TextField(null=True)), - ('duration', models.PositiveIntegerField(default=1)), - ('min_registration_limit', models.PositiveIntegerField(default=0)), - ('max_registration_limit', models.PositiveIntegerField(default=1000)), - ('courses', models.ManyToManyField(blank=True, to='programme_curriculum.Course')), - ('semester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.semester')), - ], - options={ - 'unique_together': {('semester', 'name', 'type')}, - }, - ), - migrations.CreateModel( - name='CourseInstructor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('batch_id', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.batch')), - ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_curriculum.course')), - ('instructor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'unique_together': {('course_id', 'instructor_id', 'batch_id')}, - }, - ), - ] diff --git a/FusionIIIT/applications/programme_curriculum/migrations/__init__.py b/FusionIIIT/applications/programme_curriculum/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/ps1/migrations/0001_initial.py b/FusionIIIT/applications/ps1/migrations/0001_initial.py deleted file mode 100644 index 4cd74fe33..000000000 --- a/FusionIIIT/applications/ps1/migrations/0001_initial.py +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('filetracking', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='IndentFile', - fields=[ - ('file_info', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='filetracking.file')), - ('item_name', models.CharField(max_length=250)), - ('quantity', models.IntegerField()), - ('present_stock', models.IntegerField()), - ('estimated_cost', models.IntegerField(null=True)), - ('purpose', models.CharField(max_length=250)), - ('specification', models.CharField(max_length=250)), - ('indent_type', models.CharField(max_length=250)), - ('nature', models.BooleanField(default=False)), - ('indigenous', models.BooleanField(default=False)), - ('replaced', models.BooleanField(default=False)), - ('budgetary_head', models.CharField(max_length=250)), - ('expected_delivery', models.DateField()), - ('sources_of_supply', models.CharField(max_length=250)), - ('head_approval', models.BooleanField(default=False)), - ('director_approval', models.BooleanField(default=False)), - ('financial_approval', models.BooleanField(default=False)), - ('purchased', models.BooleanField(default=False)), - ], - options={ - 'db_table': 'IndentFile', - }, - ), - migrations.CreateModel( - name='StockEntry', - fields=[ - ('item_id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='ps1.indentfile')), - ('vendor', models.CharField(max_length=250)), - ('item_name', models.CharField(max_length=250)), - ('current_stock', models.IntegerField()), - ('recieved_date', models.DateField()), - ('bill', models.FileField(upload_to='')), - ('dealing_assistant_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'StockEntry', - }, - ), - ] diff --git a/FusionIIIT/applications/ps1/migrations/__init__.py b/FusionIIIT/applications/ps1/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/recruitment/migrations/0001_initial.py b/FusionIIIT/applications/recruitment/migrations/0001_initial.py deleted file mode 100644 index 9cf2d3a77..000000000 --- a/FusionIIIT/applications/recruitment/migrations/0001_initial.py +++ /dev/null @@ -1,311 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='EducationalDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('university', models.CharField(max_length=200)), - ('board', models.CharField(max_length=200)), - ('year_of_passing', models.IntegerField()), - ('division', models.CharField(max_length=6)), - ], - ), - migrations.CreateModel( - name='Experience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('duration', models.IntegerField(null=True)), - ('organization', models.CharField(max_length=100, null=True)), - ('area', models.CharField(max_length=200, null=True)), - ], - ), - migrations.CreateModel( - name='Vacancy', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('advertisement_number', models.IntegerField()), - ('job_description', models.TextField()), - ('job_notification', models.FileField(upload_to='')), - ('number_of_vacancy', models.IntegerField(default=1)), - ('job_type', models.CharField(choices=[('T', 'Teaching'), ('NT', 'Non-Teaching')], max_length=15)), - ('last_date', models.DateField()), - ], - ), - migrations.CreateModel( - name='ThesisSupervision', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name_of_student', models.CharField(max_length=200)), - ('masters_or_phd', models.CharField(choices=[('Masters', 'Masters'), ('PhD', 'PhD')], max_length=20)), - ('year_of_completion', models.IntegerField()), - ('title_of_thesis', models.CharField(max_length=100)), - ('co_guides', models.CharField(max_length=200, null=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='TeachingExperience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('teaching_experience', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recruitment.experience')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='SponsoredProjects', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('period', models.CharField(max_length=10)), - ('sponsoring_organisation', models.CharField(max_length=200)), - ('title_of_project', models.CharField(max_length=200)), - ('grant_amount', models.IntegerField(null=True)), - ('co_investigators', models.CharField(max_length=200, null=True)), - ('status', models.CharField(choices=[('Ongoing', 'Ongoing'), ('Completed', 'Completed')], max_length=20)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='ResearchExperience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('research_experience', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recruitment.experience')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='References', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100)), - ('address', models.TextField(null=True)), - ('email', models.EmailField(max_length=254)), - ('mobile_number', models.BigIntegerField()), - ('department', models.CharField(max_length=50)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='QualifiedExams', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('net', models.BooleanField()), - ('gate', models.BooleanField()), - ('jrf', models.BooleanField()), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Publications', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('referred_journal', models.CharField(max_length=100)), - ('sci_index_journal', models.CharField(max_length=100)), - ('international_conferences', models.CharField(max_length=100, null=True)), - ('national_conferences', models.CharField(max_length=100, null=True)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='PersonalDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(default='Dr.', max_length=20)), - ('sex', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], default='M', max_length=2)), - ('profile_picture', models.ImageField(blank=True, null=True, upload_to='')), - ('marital_status', models.CharField(choices=[('M', 'Married'), ('U', 'Unmarried')], max_length=10)), - ('discipline', models.CharField(max_length=50)), - ('specialization', models.CharField(choices=[('MA', 'Major'), ('MI', 'Minor')], max_length=10)), - ('category', models.CharField(choices=[('PH', 'Physically Handicapped'), ('UR', 'Unreserved'), ('OBC', 'Other Backward Classes'), ('SC', 'Scheduled Castes'), ('ST', 'Scheduled Tribes'), ('EWS', 'Economic Weaker Section')], max_length=20)), - ('father_name', models.CharField(default='', max_length=40)), - ('address_correspondence', models.TextField(max_length=1000)), - ('address_permanent', models.TextField(default='', max_length=1000)), - ('email_alternate', models.EmailField(default='', max_length=50, null=True)), - ('phone_no', models.BigIntegerField(default=9999999999, null=True)), - ('mobile_no_first', models.BigIntegerField(default=9999999999)), - ('mobile_no_second', models.BigIntegerField(default=9999999999, null=True)), - ('date_of_birth', models.DateField(default=datetime.date(1970, 1, 1))), - ('nationality', models.CharField(max_length=30)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Patent', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('filed_national', models.CharField(max_length=200, null=True)), - ('filed_international', models.CharField(max_length=200, null=True)), - ('award_national', models.CharField(max_length=200, null=True)), - ('award_international', models.CharField(max_length=200, null=True)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='PapersInReferredJournal', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('author', models.CharField(max_length=100)), - ('year', models.IntegerField()), - ('published', models.BooleanField()), - ('accepted', models.BooleanField()), - ('title', models.CharField(max_length=100)), - ('reference_of_journal', models.CharField(max_length=100)), - ('impact_factor', models.CharField(max_length=100)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='NationalConference', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('author', models.CharField(max_length=100)), - ('year', models.IntegerField()), - ('title', models.CharField(max_length=100)), - ('name_and_place_of_conference', models.CharField(max_length=200)), - ('presented', models.BooleanField()), - ('published', models.BooleanField()), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='InternationalConference', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('author', models.CharField(max_length=100)), - ('year', models.IntegerField()), - ('title', models.CharField(max_length=100)), - ('name_and_place_of_conference', models.CharField(max_length=200)), - ('presented', models.BooleanField()), - ('published', models.BooleanField()), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='IndustrialExperience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('period', models.IntegerField(null=True)), - ('organization', models.CharField(max_length=200, null=True)), - ('title_of_post', models.CharField(max_length=200, null=True)), - ('nature_of_work', models.TextField(null=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='ExperienceDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('total_experience_months', models.IntegerField(null=True)), - ('member_of_professional_body', models.CharField(max_length=200, null=True)), - ('employer', models.CharField(max_length=100, null=True)), - ('position_held', models.CharField(max_length=100, null=True)), - ('date_of_joining', models.DateField(null=True)), - ('date_of_leaving', models.DateField(null=True)), - ('pay_in_payband', models.CharField(max_length=20, null=True)), - ('payband', models.CharField(max_length=20, null=True)), - ('AGP', models.CharField(max_length=20, null=True)), - ('reasons_for_leaving', models.TextField(null=True)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='CoursesTaught', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=100, null=True)), - ('level', models.CharField(choices=[('UG', 'UnderGraduate'), ('PG', 'PostGraduate')], max_length=20, null=True)), - ('number_of_times', models.IntegerField(null=True)), - ('developed_by_you', models.BooleanField(null=True)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Consultancy', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('period', models.CharField(max_length=10)), - ('sponsoring_organisation', models.CharField(max_length=200)), - ('title_of_project', models.CharField(max_length=200)), - ('grant_amount', models.IntegerField(null=True)), - ('co_investigators', models.CharField(max_length=200, null=True)), - ('status', models.CharField(choices=[('Ongoing', 'Ongoing'), ('Completed', 'Completed')], max_length=20)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Books', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name_of_book', models.CharField(max_length=100)), - ('year', models.IntegerField()), - ('published', models.BooleanField()), - ('title', models.CharField(max_length=100)), - ('publisher', models.CharField(max_length=200)), - ('co_author', models.CharField(max_length=100, null=True)), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='BankDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('payment_reference_number', models.CharField(max_length=20)), - ('payment_date', models.DateField()), - ('bank_name', models.CharField(max_length=100)), - ('bank_branch', models.CharField(max_length=200)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='applied', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField(default=django.utils.timezone.now)), - ('advertisement_number', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recruitment.vacancy')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='AdministrativeExperience', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('period', models.IntegerField(null=True)), - ('organization', models.CharField(max_length=200, null=True)), - ('title_of_post', models.CharField(max_length=200, null=True)), - ('nature_of_work', models.TextField(null=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='AcademicDetails', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('area_of_specialization', models.TextField()), - ('current_area_of_research', models.TextField()), - ('date_of_enrollment_in_phd', models.DateField()), - ('date_of_phd_defence', models.DateField()), - ('date_of_award_of_phd', models.DateField()), - ('XIIth', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='XIIth_details', to='recruitment.educationaldetails')), - ('Xth', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='Xth_details', to='recruitment.educationaldetails')), - ('graduation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='graduation_details', to='recruitment.educationaldetails')), - ('phd', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='phd_details', to='recruitment.educationaldetails')), - ('post_graduation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='post_graduations_details', to='recruitment.educationaldetails')), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/FusionIIIT/applications/recruitment/migrations/__init__.py b/FusionIIIT/applications/recruitment/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/research_procedures/migrations/0001_initial.py b/FusionIIIT/applications/research_procedures/migrations/0001_initial.py deleted file mode 100644 index ec4b77a48..000000000 --- a/FusionIIIT/applications/research_procedures/migrations/0001_initial.py +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='TechTransfer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('details', models.CharField(default=' ', max_length=500)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='ResearchProject', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('ptype', models.CharField(default='Research', max_length=100)), - ('pi', models.CharField(default=' ', max_length=1000)), - ('co_pi', models.CharField(default=' ', max_length=1500)), - ('title', models.TextField(default=' ', max_length=5000)), - ('funding_agency', models.CharField(default=' ', max_length=250, null=True)), - ('financial_outlay', models.CharField(default=' ', max_length=150, null=True)), - ('status', models.CharField(choices=[('Awarded', 'Awarded'), ('Submitted', 'Submitted'), ('Ongoing', 'Ongoing'), ('Completed', 'Completed')], max_length=10)), - ('start_date', models.DateField(blank=True, null=True)), - ('finish_date', models.DateField(blank=True, null=True)), - ('date_submission', models.DateField(blank=True, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='ResearchGroup', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=120)), - ('description', models.TextField()), - ('faculty_under_group', models.ManyToManyField(related_name='allfaculty', to=settings.AUTH_USER_MODEL)), - ('students_under_group', models.ManyToManyField(related_name='allstudents', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Patent', - fields=[ - ('application_id', models.AutoField(primary_key=True, serialize=False)), - ('title', models.CharField(max_length=120)), - ('ipd_form', models.FileField(blank=True, null=True, upload_to='')), - ('project_details', models.FileField(blank=True, null=True, upload_to='')), - ('ipd_form_file', models.TextField(blank=True, null=True)), - ('project_details_file', models.TextField(blank=True, null=True)), - ('status', models.CharField(choices=[('Approved', 'Approved'), ('Disapproved', 'Disapproved'), ('Pending', 'Pending')], default='Pending', max_length=20)), - ('faculty_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - ), - migrations.CreateModel( - name='ConsultancyProject', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('pf_no', models.IntegerField()), - ('consultants', models.CharField(max_length=150)), - ('title', models.CharField(max_length=1000)), - ('client', models.CharField(max_length=1000)), - ('financial_outlay', models.IntegerField()), - ('start_date', models.DateField(blank=True, null=True)), - ('end_date', models.DateField(blank=True, null=True)), - ('duration', models.CharField(blank=True, max_length=500, null=True)), - ('date_entry', models.DateField(blank=True, default=datetime.datetime.now, null=True)), - ('status', models.CharField(blank=True, choices=[('Completed', 'Completed'), ('Submitted', 'Submitted'), ('Ongoing', 'Ongoing')], default='Ongoing', max_length=10, null=True)), - ('remarks', models.CharField(blank=True, max_length=1000, null=True)), - ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/FusionIIIT/applications/research_procedures/migrations/__init__.py b/FusionIIIT/applications/research_procedures/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/research_procedures/models.py b/FusionIIIT/applications/research_procedures/models.py index 559b56fd9..6cf2b67aa 100644 --- a/FusionIIIT/applications/research_procedures/models.py +++ b/FusionIIIT/applications/research_procedures/models.py @@ -103,4 +103,4 @@ class TechTransfer(models.Model): end_date = models.DateField(null=True,blank=True) def __str__(self): - return 'PF No.: {} Details: {}'.format(self.pf_no, self.details) \ No newline at end of file + return 'PF No.: {} Details: {}'.format(self.pf_no, self.details) diff --git a/FusionIIIT/applications/scholarships/migrations/0001_initial.py b/FusionIIIT/applications/scholarships/migrations/0001_initial.py deleted file mode 100644 index 176422fd9..000000000 --- a/FusionIIIT/applications/scholarships/migrations/0001_initial.py +++ /dev/null @@ -1,233 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('academic_information', '0001_initial'), - ('globals', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Award_and_scholarship', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('award_name', models.CharField(default='', max_length=100)), - ('catalog', models.TextField(max_length=5000)), - ], - options={ - 'db_table': 'Award_and_scholarship', - }, - ), - migrations.CreateModel( - name='Release', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date_time', models.DateTimeField(blank=True, default=datetime.datetime.now)), - ('programme', models.CharField(default='B.Tech', max_length=10)), - ('startdate', models.DateField(default=datetime.date.today)), - ('enddate', models.DateField()), - ('award', models.CharField(default='', max_length=50)), - ('remarks', models.TextField(default='', max_length=500)), - ('batch', models.TextField(default='all')), - ('notif_visible', models.IntegerField(default=1)), - ], - options={ - 'db_table': 'Release', - }, - ), - migrations.CreateModel( - name='Proficiency_dm', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('relevant_document', models.FileField(blank=True, null=True, upload_to='')), - ('title_name', models.CharField(max_length=30, null=True)), - ('award_type', models.CharField(max_length=50, null=True)), - ('status', models.CharField(choices=[('Complete', 'COMPLETE'), ('Incomplete', 'INCOMPLETE'), ('Reject', 'REJECT'), ('Accept', 'ACCEPT')], default='INCOMPLETE', max_length=10)), - ('no_of_students', models.IntegerField(default=1)), - ('date', models.DateField(default=datetime.date.today)), - ('roll_no1', models.IntegerField(default=0)), - ('roll_no2', models.IntegerField(default=0)), - ('roll_no3', models.IntegerField(default=0)), - ('roll_no4', models.IntegerField(default=0)), - ('roll_no5', models.IntegerField(default=0)), - ('brief_description', models.TextField(max_length=1000, null=True)), - ('justification', models.TextField(max_length=1000, null=True)), - ('ece_topic', models.CharField(max_length=25, null=True)), - ('cse_topic', models.CharField(max_length=25, null=True)), - ('mech_topic', models.CharField(max_length=25, null=True)), - ('design_topic', models.CharField(max_length=25, null=True)), - ('ece_percentage', models.IntegerField(null=True)), - ('cse_percentage', models.IntegerField(null=True)), - ('mech_percentage', models.IntegerField(null=True)), - ('design_percentage', models.IntegerField(null=True)), - ('correspondence_address', models.CharField(max_length=100, null=True)), - ('financial_assistance', models.TextField(max_length=1000, null=True)), - ('grand_total', models.IntegerField(null=True)), - ('nearest_policestation', models.CharField(max_length=25, null=True)), - ('nearest_railwaystation', models.CharField(max_length=25, null=True)), - ('award_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Proficiency_dm', - }, - ), - migrations.CreateModel( - name='Previous_winner', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('programme', models.CharField(default='B.Tech', max_length=10)), - ('year', models.IntegerField(default=2023)), - ('award_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Previous_winner', - }, - ), - migrations.CreateModel( - name='Notional_prize', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('spi', models.FloatField()), - ('cpi', models.FloatField()), - ('year', models.CharField(choices=[('UG1', 'UG1'), ('UG2', 'UG2'), ('UG3', 'UG3'), ('UG4', 'UG4'), ('PG1', 'PG1'), ('PG2', 'PG2')], max_length=10)), - ('award_id', models.ForeignKey(default=4, on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ], - options={ - 'db_table': 'Notional_prize', - }, - ), - migrations.CreateModel( - name='Notification', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('notification_mcm_flag', models.BooleanField(default=False)), - ('notification_convocation_flag', models.BooleanField(default=False)), - ('invite_mcm_accept_flag', models.BooleanField(default=False)), - ('invite_convocation_accept_flag', models.BooleanField(default=False)), - ('release_id', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='scholarships.release')), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Notification', - }, - ), - migrations.CreateModel( - name='Mcm', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('brother_name', models.CharField(max_length=30, null=True)), - ('brother_occupation', models.TextField(max_length=100, null=True)), - ('sister_name', models.CharField(max_length=30, null=True)), - ('sister_occupation', models.TextField(max_length=100, null=True)), - ('income_father', models.IntegerField(default=0)), - ('income_mother', models.IntegerField(default=0)), - ('income_other', models.IntegerField(default=0)), - ('father_occ', models.CharField(choices=[('government', 'Government'), ('private', 'Private'), ('public', 'Public'), ('business', 'Business'), ('medical', 'Medical'), ('consultant', 'Consultant'), ('pensioners', 'Pensioners')], default='', max_length=10)), - ('mother_occ', models.CharField(choices=[('EMPLOYED', 'EMPLOYED'), ('HOUSE_WIFE', 'HOUSE_WIFE')], default='', max_length=10)), - ('father_occ_desc', models.CharField(max_length=30, null=True)), - ('mother_occ_desc', models.CharField(max_length=30, null=True)), - ('four_wheeler', models.IntegerField(blank=True, null=True)), - ('four_wheeler_desc', models.CharField(max_length=30, null=True)), - ('two_wheeler', models.IntegerField(blank=True, null=True)), - ('two_wheeler_desc', models.CharField(max_length=30, null=True)), - ('house', models.CharField(max_length=10, null=True)), - ('plot_area', models.IntegerField(blank=True, null=True)), - ('constructed_area', models.IntegerField(blank=True, null=True)), - ('school_fee', models.IntegerField(blank=True, null=True)), - ('school_name', models.CharField(max_length=30, null=True)), - ('bank_name', models.CharField(max_length=100, null=True)), - ('loan_amount', models.IntegerField(blank=True, null=True)), - ('college_fee', models.IntegerField(blank=True, null=True)), - ('college_name', models.CharField(max_length=30, null=True)), - ('income_certificate', models.FileField(blank=True, null=True, upload_to='')), - ('forms', models.FileField(blank=True, null=True, upload_to='')), - ('status', models.CharField(choices=[('Complete', 'COMPLETE'), ('Incomplete', 'INCOMPLETE'), ('Reject', 'REJECT'), ('Accept', 'ACCEPT')], default='INCOMPLETE', max_length=10)), - ('annual_income', models.IntegerField(default=0)), - ('date', models.DateField(default=datetime.date.today)), - ('award_id', models.ForeignKey(default=4, on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mcm_info', to='academic_information.student')), - ], - options={ - 'db_table': 'Mcm', - }, - ), - migrations.CreateModel( - name='Director_silver', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('nearest_policestation', models.TextField(default='station', max_length=30)), - ('nearest_railwaystation', models.TextField(default='station', max_length=30)), - ('correspondence_address', models.TextField(max_length=150, null=True)), - ('award_type', models.CharField(max_length=50, null=True)), - ('status', models.CharField(choices=[('Complete', 'COMPLETE'), ('Incomplete', 'INCOMPLETE'), ('Reject', 'REJECT'), ('Accept', 'ACCEPT')], default='INCOMPLETE', max_length=10)), - ('relevant_document', models.FileField(blank=True, null=True, upload_to='')), - ('date', models.DateField(default=datetime.date.today)), - ('financial_assistance', models.TextField(max_length=1000, null=True)), - ('grand_total', models.IntegerField(null=True)), - ('inside_achievements', models.TextField(max_length=1000, null=True)), - ('justification', models.TextField(max_length=1000, null=True)), - ('outside_achievements', models.TextField(max_length=1000, null=True)), - ('award_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Director_silver', - }, - ), - migrations.CreateModel( - name='Director_gold', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', models.CharField(choices=[('Complete', 'COMPLETE'), ('Incomplete', 'INCOMPLETE'), ('Reject', 'REJECT'), ('Accept', 'ACCEPT')], default='INCOMPLETE', max_length=10)), - ('relevant_document', models.FileField(blank=True, null=True, upload_to='')), - ('date', models.DateField(default=datetime.date.today)), - ('academic_achievements', models.TextField(max_length=1000, null=True)), - ('science_inside', models.TextField(max_length=1000, null=True)), - ('science_outside', models.TextField(max_length=1000, null=True)), - ('games_inside', models.TextField(max_length=1000, null=True)), - ('games_outside', models.TextField(max_length=1000, null=True)), - ('cultural_inside', models.TextField(max_length=1000, null=True)), - ('cultural_outside', models.TextField(max_length=1000, null=True)), - ('social', models.TextField(max_length=1000, null=True)), - ('corporate', models.TextField(max_length=1000, null=True)), - ('hall_activities', models.TextField(max_length=1000, null=True)), - ('gymkhana_activities', models.TextField(max_length=1000, null=True)), - ('institute_activities', models.TextField(max_length=1000, null=True)), - ('counselling_activities', models.TextField(max_length=1000, null=True)), - ('other_activities', models.TextField(max_length=1000, null=True)), - ('justification', models.TextField(max_length=1000, null=True)), - ('correspondence_address', models.CharField(max_length=100, null=True)), - ('financial_assistance', models.TextField(max_length=1000, null=True)), - ('grand_total', models.IntegerField(null=True)), - ('nearest_policestation', models.CharField(max_length=25, null=True)), - ('nearest_railwaystation', models.CharField(max_length=25, null=True)), - ('award_id', models.ForeignKey(default=4, on_delete=django.db.models.deletion.CASCADE, to='scholarships.award_and_scholarship')), - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic_information.student')), - ], - options={ - 'db_table': 'Director_gold', - }, - ), - migrations.CreateModel( - name='Application', - fields=[ - ('application_id', models.CharField(max_length=100, primary_key=True, serialize=False)), - ('applied_flag', models.BooleanField(default=False)), - ('award', models.CharField(max_length=30)), - ('student_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='globals.extrainfo')), - ], - options={ - 'db_table': 'Application', - }, - ), - ] diff --git a/FusionIIIT/applications/scholarships/migrations/__init__.py b/FusionIIIT/applications/scholarships/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/applications/visitor_hostel/migrations/0001_initial.py b/FusionIIIT/applications/visitor_hostel/migrations/0001_initial.py deleted file mode 100644 index f4229feb2..000000000 --- a/FusionIIIT/applications/visitor_hostel/migrations/0001_initial.py +++ /dev/null @@ -1,134 +0,0 @@ -# Generated by Django 3.1.5 on 2023-03-15 18:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='BookingDetail', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('visitor_category', models.CharField(choices=[('A', 'A'), ('B', 'B'), ('C', 'C'), ('D', 'D')], default='C', max_length=1)), - ('modified_visitor_category', models.CharField(choices=[('A', 'A'), ('B', 'B'), ('C', 'C'), ('D', 'D')], default='C', max_length=1)), - ('person_count', models.IntegerField(default=1)), - ('purpose', models.TextField(default='Hi!')), - ('booking_from', models.DateField()), - ('booking_to', models.DateField()), - ('arrival_time', models.TextField(blank=True, null=True)), - ('departure_time', models.TextField(blank=True, null=True)), - ('forwarded_date', models.DateField(blank=True, null=True)), - ('confirmed_date', models.DateField(blank=True, null=True)), - ('check_in', models.DateField(blank=True, null=True)), - ('check_out', models.DateField(blank=True, null=True)), - ('check_in_time', models.TimeField(blank=True, null=True)), - ('check_out_time', models.TimeField(blank=True, null=True)), - ('status', models.CharField(choices=[('Confirmed', 'Confirmed'), ('Pending', 'Pending'), ('Rejected', 'Rejected'), ('Canceled', 'Canceled'), ('CancelRequested', 'CancelRequested'), ('CheckedIn', 'CheckedIn'), ('Complete', 'Complete'), ('Forward', 'Forward')], default='Pending', max_length=15)), - ('remark', models.CharField(blank=True, max_length=40, null=True)), - ('image', models.FileField(blank=True, null=True, upload_to='VhImage/')), - ('number_of_rooms', models.IntegerField(blank=True, default=1, null=True)), - ('number_of_rooms_alloted', models.IntegerField(blank=True, default=1, null=True)), - ('booking_date', models.DateField(default=django.utils.timezone.now)), - ('bill_to_be_settled_by', models.CharField(choices=[('Intender', 'Intender'), ('Visitor', 'Visitor'), ('ProjectNo', 'ProjectNo'), ('Institute', 'Institute')], default='Intender', max_length=15)), - ('caretaker', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='caretaker', to=settings.AUTH_USER_MODEL)), - ('intender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='intender', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Inventory', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('item_name', models.CharField(max_length=20)), - ('quantity', models.IntegerField(default=0)), - ('consumable', models.BooleanField(default=False)), - ('opening_stock', models.IntegerField(default=0)), - ('addition_stock', models.IntegerField(default=0)), - ('total_stock', models.IntegerField(default=0)), - ('serviceable', models.IntegerField(default=0)), - ('non_serviceable', models.IntegerField(default=0)), - ('inuse', models.IntegerField(default=0)), - ('total_usable', models.IntegerField(default=0)), - ('remark', models.TextField(blank=True)), - ], - ), - migrations.CreateModel( - name='VisitorDetail', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('visitor_phone', models.CharField(max_length=15)), - ('visitor_name', models.CharField(max_length=40)), - ('visitor_email', models.CharField(blank=True, max_length=40)), - ('visitor_organization', models.CharField(blank=True, max_length=100)), - ('visitor_address', models.TextField(blank=True)), - ('nationality', models.CharField(blank=True, max_length=20)), - ], - ), - migrations.CreateModel( - name='RoomDetail', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('room_number', models.CharField(max_length=4, unique=True)), - ('room_type', models.CharField(choices=[('SingleBed', 'SingleBed'), ('DoubleBed', 'DoubleBed'), ('VIP', 'VIP')], max_length=12)), - ('room_floor', models.CharField(choices=[('GroundFloor', 'GroundFloor'), ('FirstFloor', 'FirstFloor'), ('SecondFloor', 'SecondFloor'), ('ThirdFloor', 'ThirdFloor')], max_length=12)), - ('room_status', models.CharField(choices=[('Booked', 'Booked'), ('CheckedIn', 'CheckedIn'), ('Available', 'Available'), ('UnderMaintenance', 'UnderMaintenance')], default='Available', max_length=20)), - ('visitor', models.ManyToManyField(blank=True, to='visitor_hostel.VisitorDetail')), - ], - ), - migrations.CreateModel( - name='MealRecord', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meal_date', models.DateField()), - ('morning_tea', models.BooleanField(default=False)), - ('eve_tea', models.BooleanField(default=False)), - ('breakfast', models.BooleanField(default=False)), - ('lunch', models.BooleanField(default=False)), - ('dinner', models.BooleanField(default=False)), - ('persons', models.IntegerField(default=0)), - ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='visitor_hostel.bookingdetail')), - ('room', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='visitor_hostel.roomdetail')), - ('visitor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='visitor_hostel.visitordetail')), - ], - ), - migrations.CreateModel( - name='InventoryBill', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('bill_number', models.CharField(max_length=40)), - ('cost', models.IntegerField(default=0)), - ('item_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='visitor_hostel.inventory')), - ], - ), - migrations.AddField( - model_name='bookingdetail', - name='rooms', - field=models.ManyToManyField(to='visitor_hostel.RoomDetail'), - ), - migrations.AddField( - model_name='bookingdetail', - name='visitor', - field=models.ManyToManyField(to='visitor_hostel.VisitorDetail'), - ), - migrations.CreateModel( - name='Bill', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meal_bill', models.IntegerField(default=0)), - ('room_bill', models.IntegerField(default=0)), - ('payment_status', models.BooleanField(default=False)), - ('booking', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='visitor_hostel.bookingdetail')), - ('caretaker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ('room', models.ManyToManyField(to='visitor_hostel.RoomDetail')), - ], - ), - ] diff --git a/FusionIIIT/applications/visitor_hostel/migrations/__init__.py b/FusionIIIT/applications/visitor_hostel/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/FusionIIIT/templates/academic_procedures/academic.html b/FusionIIIT/templates/academic_procedures/academic.html old mode 100755 new mode 100644 index 6b04a54fb..35eebf446 --- a/FusionIIIT/templates/academic_procedures/academic.html +++ b/FusionIIIT/templates/academic_procedures/academic.html @@ -22,6 +22,39 @@ } + + {% endblock css %} @@ -30,13 +63,12 @@ {% include 'dashboard/navbar.html' %} {% endblock %} -
+
- {% comment %}The left-margin segment!{% endcomment %} -
+ {% comment %}The left-rail segment starts here!{% endcomment %} -
+
{% comment %}The user image card starts here!{% endcomment %} {% block usercard %} {% include 'globals/usercard.html' %} @@ -46,8 +78,8 @@
{% comment %}The Tab-Menu starts here!{% endcomment %} -