Skip to content

Commit

Permalink
Merge pull request #62 from TRISHANT131104/main
Browse files Browse the repository at this point in the history
Changed Semester Details
  • Loading branch information
TRISHANT131104 authored Aug 13, 2024
2 parents 4dc4997 + f8f14a7 commit 743f13c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions home/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{
Expand All @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions home/utils/clean_rebate_sheet.py
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
Caterer's-Information
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
{% for caterer in all_caterer%}
{% for caterer in all_caterer%}
<li><a class="dropdown-item" href="/caterer/{{ caterer.name }}" style="color:rgb(18, 37, 106) ; font-weight: bold; ">{{caterer.name}} Caterers</a></li>
{% endfor %}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ <h1 class="text-center text-decoration-underline">About Us</h1>
<h1 class="text-center text-decoration-underline">Updates</h1>
<div class="container-fluid">
<ul>
<!-- <li>
<li>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">Know Your Menu</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
{% for caterer in all_caterer%}
<li><a class="dropdown-item" href="{{ caterer.sheet_url }}" target="_blank"style=" font-weight: bold; ">{{caterer.name}} Caterers</a></li>
{% endfor %}
</ul>
</li> -->
</li>
<li>
<a class="text-decoration-none text-black" href="/profile/" role="button" >Know Your Bill</a>
</li>
Expand Down

0 comments on commit 743f13c

Please sign in to comment.