diff --git a/README.md b/README.md index 8003ff1..b4a4fc1 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Before you begin, ensure you have the following installed: 2. Navigate to the project directory: ```shell - cd team_22 + cd Mess-Website ``` 3. Install all dependencies diff --git a/home/admin.py b/home/admin.py index b465d97..e5a4688 100644 --- a/home/admin.py +++ b/home/admin.py @@ -862,7 +862,7 @@ class about_Admin(ImportExportModelAdmin, admin.ModelAdmin): "period", "student_id", "caterer", - "high_tea", + # "high_tea", "jain", "first_pref", "second_pref", diff --git a/home/resources.py b/home/resources.py index b9428c0..cdd93ed 100644 --- a/home/resources.py +++ b/home/resources.py @@ -76,7 +76,7 @@ class AllocationNewResource(resources.ModelResource): period = fields.Field(attribute="period", column_name="Period") student_id = fields.Field(attribute="student_id", column_name="Student ID") caterer__name = fields.Field(attribute="caterer__name", column_name="Caterer Allocated") - high_tea = fields.Field(attribute="high_tea", column_name="High Tea") + # high_tea = fields.Field(attribute="high_tea", column_name="High Tea") jain = fields.Field(attribute="jain", column_name="Jain") first_pref = fields.Field(attribute="first_pref", column_name="First Preferences") second_pref = fields.Field( @@ -99,7 +99,7 @@ class Meta: "period", "student_id", "caterer__name", - "high_tea", + # "high_tea", "jain", "first_pref", "second_pref", @@ -116,7 +116,7 @@ class Meta: "email__room_no", "student_id", "caterer__name", - "high_tea", + # "high_tea", "jain", "first_pref", "second_pref", diff --git a/home/views.py b/home/views.py index 1c40f80..c8a18bc 100644 --- a/home/views.py +++ b/home/views.py @@ -411,12 +411,19 @@ def profile(request): socialaccount_obj = SocialAccount.objects.filter(provider='google', user_id=request.user.id) picture = "not available" allocation = Allocation.objects.filter(email=student).last() + allocation_info = {} #improve this alignment of text to be shown on the profile section if allocation: allocation_info_list = [allocation.student_id, allocation.caterer.name, str(allocation.high_tea)] - allocation_info = "Allocation ID: " + allocation.student_id + " Caterer: " + allocation.caterer.name + " High Tea: " + str(allocation.high_tea) + " Jain: " + str(allocation.jain) - else: - allocation_info = "Not allocated for this period" + allocation_info = { + "Allocation ID": allocation.student_id, + "Caterer": allocation.caterer.name, + "High Tea": "Yes" if allocation.high_tea else "No", + "Jain": "Yes" if allocation.jain else "No", + } + # allocation_info = "Allocation ID: " + allocation.student_id + " Caterer: " + allocation.caterer.name + " High Tea: " + str(allocation.high_tea) + " Jain: " + str(allocation.jain) + # else: + # allocation_info = "Not allocated for this period" try: if len(socialaccount_obj ): picture = socialaccount_obj[0].extra_data['picture'] diff --git a/messWebsite/settings.py b/messWebsite/settings.py index 2f9cccd..ef361da 100644 --- a/messWebsite/settings.py +++ b/messWebsite/settings.py @@ -16,7 +16,7 @@ SECRET_KEY = env('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ["diningfee.iiti.ac.in","127.0.0.1"] CSRF_TRUSTED_ORIGINS = ['http://diningfee.iiti.ac.in'] diff --git a/templates/allocationForm.html b/templates/allocationForm.html index 717c40f..b3aa867 100644 --- a/templates/allocationForm.html +++ b/templates/allocationForm.html @@ -26,9 +26,9 @@