From f8f14a79d3efd3080de28d93f49a51dc5c5f9b34 Mon Sep 17 00:00:00 2001 From: Trishant_Talluri Date: Tue, 13 Aug 2024 23:53:29 +0530 Subject: [PATCH] Made Changes in admin.py for new Semester Rolled back commented caterer list Removed uneccessary code --- home/admin.py | 6 +++--- home/utils/clean_rebate_sheet.py | 4 ++-- templates/base.html | 2 +- templates/home.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/home/admin.py b/home/admin.py index 8e5455f..9c5011b 100644 --- a/home/admin.py +++ b/home/admin.py @@ -868,7 +868,7 @@ class about_Admin(ImportExportModelAdmin, admin.ModelAdmin): resource_class = AllocationNewResource model = Allocation search_fields = ("email__name","email__roll_no","email__hostel","email__email","student_id", "caterer__name") - list_filter = ("period", "caterer", "jain","email__hostel","email__degree","email__department",) + list_filter = ("period","caterer", "jain","email__hostel","email__degree","email__department",) list_display = ("student_id","name","email","period", "caterer", "jain") fieldsets = ((None, { @@ -891,10 +891,10 @@ def get_queryset(self, request): qs = super().get_queryset(request) if request.user.is_superuser: return qs - semester = Semester.objects.get(name="Spring 2024") + semester = Semester.objects.first() if(request.user.groups.filter(name="College Administration")): return qs - return qs.filter(period__semester=semester).filter(period__Sno__in=[2,3,4,5]).filter(caterer__name=request.user.username) + return qs.filter(period__semester=semester).filter(period__Sno__in=[1,]).filter(caterer__name=request.user.username) @admin.display(description="email") diff --git a/home/utils/clean_rebate_sheet.py b/home/utils/clean_rebate_sheet.py index 18ce8fe..7f547e9 100644 --- a/home/utils/clean_rebate_sheet.py +++ b/home/utils/clean_rebate_sheet.py @@ -1,6 +1,6 @@ import pandas as pd -excel_file = r"C:\Users\ishaa\Downloads\apj-5.xlsx" +excel_file = r"/home/trish/Desktop/Coding/Gymkhana-WebTeam/APJ.ods" # sheet_name = 'HJB' column_to_check = 'Email' @@ -9,7 +9,7 @@ df = df.dropna(subset=[column_to_check]) -output_file = r'C:\Users\ishaa\Downloads\hjb.xlsx' +output_file = r"/home/trish/Desktop/Coding/Gymkhana-WebTeam/APJ_details.xlsx" df.to_excel(output_file, index=False) diff --git a/templates/base.html b/templates/base.html index 2e51443..f82f617 100644 --- a/templates/base.html +++ b/templates/base.html @@ -60,7 +60,7 @@ Caterer's-Information diff --git a/templates/home.html b/templates/home.html index e0d94ff..94e8e48 100644 --- a/templates/home.html +++ b/templates/home.html @@ -52,7 +52,7 @@

About Us

Updates