diff --git a/FusionIIIT/Fusion/settings/development.py b/FusionIIIT/Fusion/settings/development.py index 3f95a478c..8f395e83a 100644 --- a/FusionIIIT/Fusion/settings/development.py +++ b/FusionIIIT/Fusion/settings/development.py @@ -63,3 +63,8 @@ #the below job which we need to add in production server, to update the mess bill of student everyday at 10 pm in night ('0 22 * * *', 'applications.central_mess.tasks.generate_bill'), ] + +CRONTAB_DJANGO_MANAGE_PATH = '/home/owlman/Desktop/Fuse/Fusion/FusionIIIT/manage.py' + +MEDIA_URL = "/media/" +MEDIA_ROOT=os.path.join(BASE_DIR,"media/") diff --git a/FusionIIIT/applications/academic_information/models.py b/FusionIIIT/applications/academic_information/models.py index b3dfda008..94f67df4a 100755 --- a/FusionIIIT/applications/academic_information/models.py +++ b/FusionIIIT/applications/academic_information/models.py @@ -93,8 +93,8 @@ class Student(models.Model): batch_id = models.ForeignKey(Batch, null=True, blank=True, on_delete=models.CASCADE) cpi = models.FloatField(default=0) category = models.CharField(max_length=10, choices=Constants.CATEGORY, null=False) - father_name = models.CharField(max_length=40, default='',null=True) - mother_name = models.CharField(max_length=40, default='',null=True) + father_name = models.CharField(max_length=40, default='',null=True, blank=True) + mother_name = models.CharField(max_length=40, default='',null=True, blank=True) hall_no = models.IntegerField(default=0) room_no = models.CharField(max_length=10, blank=True, null=True) specialization = models.CharField(max_length=40,choices=Constants.MTechSpecialization, null=True, default='') diff --git a/FusionIIIT/applications/department/views.py b/FusionIIIT/applications/department/views.py index ef7e71c64..f138c77db 100644 --- a/FusionIIIT/applications/department/views.py +++ b/FusionIIIT/applications/department/views.py @@ -178,7 +178,7 @@ def faculty_view(request): upload_announcement=upload_announcement, department = department, ann_date=ann_date) - # department_notif(usrnm, recipients , message) + department_notif(usrnm, recipients , message) context = browse_announcements() return render(request, 'department/dep_request.html', {"user_designation":user_info.user_type, @@ -223,7 +223,7 @@ def staff_view(request): upload_announcement=upload_announcement, department = department, ann_date=ann_date) - # department_notif(usrnm, recipients , message) + department_notif(usrnm, recipients , message) context = browse_announcements() return render(request, 'department/dep_request.html', {"user_designation":user_info.user_type, diff --git a/FusionIIIT/applications/globals/api/urls.py b/FusionIIIT/applications/globals/api/urls.py index 0199f7688..5652eeb4f 100644 --- a/FusionIIIT/applications/globals/api/urls.py +++ b/FusionIIIT/applications/globals/api/urls.py @@ -18,4 +18,5 @@ url(r'^notification/read',views.NotificationRead,name='notifications-read') -] \ No newline at end of file +] + diff --git a/FusionIIIT/applications/health_center/api/views.py b/FusionIIIT/applications/health_center/api/views.py index f82665a69..3cbc52c83 100644 --- a/FusionIIIT/applications/health_center/api/views.py +++ b/FusionIIIT/applications/health_center/api/views.py @@ -350,4 +350,5 @@ def compounder_view_api(request): else: resp = {'message': 'invalid request'} - return Response(data=resp,status=status.HTTP_404_NOT_FOUND) # compounder view ends \ No newline at end of file + return Response(data=resp,status=status.HTTP_404_NOT_FOUND) # compounder view ends + diff --git a/FusionIIIT/applications/notifications_extension/api/serializers.py b/FusionIIIT/applications/notifications_extension/api/serializers.py new file mode 100644 index 000000000..899c50e57 --- /dev/null +++ b/FusionIIIT/applications/notifications_extension/api/serializers.py @@ -0,0 +1,6 @@ +from rest_framework import serializers +from notifications.models import Notification +class NotificationSerializer(serializers.ModelSerializer): + class Meta: + model = Notification + fields = '__all__' \ No newline at end of file diff --git a/FusionIIIT/applications/notifications_extension/api/urls.py b/FusionIIIT/applications/notifications_extension/api/urls.py new file mode 100644 index 000000000..1b420e336 --- /dev/null +++ b/FusionIIIT/applications/notifications_extension/api/urls.py @@ -0,0 +1,51 @@ +# urls.py +from django.urls import path +from .views import ( + LeaveModuleNotificationAPIView, + PlacementCellNotificationAPIView, + AcademicsModuleNotificationAPIView, + OfficeModuleNotificationAPIView, + CentralMessNotificationAPIView, + VisitorsHostelNotificationAPIView, + HealthcareCenterNotificationAPIView, + FileTrackingNotificationAPIView, + ScholarshipPortalNotificationAPIView, + ComplaintSystemNotificationAPIView, + OfficeDeanPnDNotificationAPIView, + OfficeDeanSNotificationAPIView, + GymkhanaVotingNotificationAPIView, + GymkhanaSessionNotificationAPIView, + GymkhanaEventNotificationAPIView, + AssistantshipClaimNotificationAPIView, + DepartmentNotificationAPIView, + OfficeDeanRSPCNotificationAPIView, + ResearchProceduresNotificationAPIView, + MarkAsRead, + Delete, + NotificationsList, +) + +urlpatterns = [ + path('notifications/', NotificationsList.as_view(), name='notifications' ), + path('delete/', Delete.as_view(),name='delete'), + path('mark_as_read/', MarkAsRead.as_view(),name='mark_as_read'), + path('leave_module_notification/', LeaveModuleNotificationAPIView.as_view(), name='leave_module_notification'), + path('placement_cell_notification/', PlacementCellNotificationAPIView.as_view(), name='placement_cell_notification'), + path('academics_module_notification/', AcademicsModuleNotificationAPIView.as_view(), name='academics_module_notification'), + path('office_module_notification/', OfficeModuleNotificationAPIView.as_view(), name='office_module_notification'), + path('central_mess_notification/', CentralMessNotificationAPIView.as_view(), name='central_mess_notification'), + path('visitors_hostel_notification/', VisitorsHostelNotificationAPIView.as_view(), name='visitors_hostel_notification'), + path('healthcare_center_notification/', HealthcareCenterNotificationAPIView.as_view(), name='healthcare_center_notification'), + path('file_tracking_notification/', FileTrackingNotificationAPIView.as_view(), name='file_tracking_notification'), + path('scholarship_portal_notification/', ScholarshipPortalNotificationAPIView.as_view(), name='scholarship_portal_notification'), + path('complaint_system_notification/', ComplaintSystemNotificationAPIView.as_view(), name='complaint_system_notification'), + path('office_dean_PnD_notification/', OfficeDeanPnDNotificationAPIView.as_view(), name='office_dean_PnD_notification'), + path('office_dean_S_notification/', OfficeDeanSNotificationAPIView.as_view(), name='office_dean_S_notification'), + path('gymkhana_voting/', GymkhanaVotingNotificationAPIView.as_view(), name='gymkhana_voting'), + path('gymkhana_session/', GymkhanaSessionNotificationAPIView.as_view(), name='gymkhana_session'), + path('gymkhana_event/', GymkhanaEventNotificationAPIView.as_view(), name='gymkhana_event'), + path('assistantship_claim/', AssistantshipClaimNotificationAPIView.as_view(), name='assistantship_claim'), + path('department_notification/', DepartmentNotificationAPIView.as_view(), name='department_notification'), + path('office_dean_RSPC_notification/', OfficeDeanRSPCNotificationAPIView.as_view(), name='office_dean_RSPC_notification'), + path('research_procedures_notification/', ResearchProceduresNotificationAPIView.as_view(), name='research_procedures_notification'), +] diff --git a/FusionIIIT/applications/notifications_extension/api/views.py b/FusionIIIT/applications/notifications_extension/api/views.py new file mode 100644 index 000000000..b87b488da --- /dev/null +++ b/FusionIIIT/applications/notifications_extension/api/views.py @@ -0,0 +1,357 @@ +# views.py +from rest_framework.views import APIView +from django.contrib.auth import get_user_model +from rest_framework.response import Response +from notifications.utils import slug2id +from django.shortcuts import get_object_or_404 +from rest_framework.generics import ListAPIView +from notifications.models import Notification +from rest_framework import status +from .serializers import NotificationSerializer +from notification.views import (leave_module_notif, + placement_cell_notif, + academics_module_notif, + office_module_notif, + central_mess_notif, + visitors_hostel_notif, + healthcare_center_notif, + file_tracking_notif, + scholarship_portal_notif, + complaint_system_notif, + office_dean_PnD_notif, + office_module_DeanS_notif, + gymkhana_voting, + gymkhana_session, + gymkhana_event, + AssistantshipClaim_notify, + AssistantshipClaim_faculty_notify, + AssistantshipClaim_acad_notify, + AssistantshipClaim_account_notify, + department_notif, + office_module_DeanRSPC_notif, + research_procedures_notif) + + + +class LeaveModuleNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + date = request.data.get('date') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + leave_module_notif(sender, recipient, type, date) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class PlacementCellNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + placement_cell_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class AcademicsModuleNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + academics_module_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class OfficeModuleNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + office_module_notif(sender, recipient) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) +class CentralMessNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + message = request.data.get('message') + + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + + # Trigger the notification function + central_mess_notif(sender, recipient, type, message) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class VisitorsHostelNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + visitors_hostel_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class HealthcareCenterNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + + # Trigger the notification function + healthcare_center_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class FileTrackingNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + title = request.data.get('title') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + file_tracking_notif(sender, recipient, title) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) +class ScholarshipPortalNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + scholarship_portal_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class ComplaintSystemNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + complaint_id = request.data.get('complaint_id') + student = request.data.get('student') + message = request.data.get('message') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + complaint_system_notif(sender, recipient, type, complaint_id, student, message) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class OfficeDeanPnDNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + office_dean_PnD_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class OfficeDeanSNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + office_module_DeanS_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class GymkhanaVotingNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + title = request.data.get('title') + desc = request.data.get('desc') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + gymkhana_voting(sender, recipient, type, title, desc) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class GymkhanaSessionNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + club = request.data.get('club') + desc = request.data.get('desc') + venue = request.data.get('venue') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + gymkhana_session(sender, recipient, type, club, desc, venue) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class GymkhanaEventNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + club = request.data.get('club') + event_name = request.data.get('event_name') + desc = request.data.get('desc') + venue = request.data.get('venue') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + gymkhana_event(sender, recipient, type, club, event_name, desc, venue) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class AssistantshipClaimNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + month = request.data.get('month') + year = request.data.get('year') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + AssistantshipClaim_notify(sender, recipient, month, year) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) +class AssistantshipClaimFacultyNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + AssistantshipClaim_faculty_notify(sender, recipient) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class AssistantshipClaimAcadNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + AssistantshipClaim_acad_notify(sender, recipient) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class AssistantshipClaimAccountNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + stu = request.data.get('stu') + recipient_id = request.data.get('recipient') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + AssistantshipClaim_account_notify(sender, stu, recipient) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class DepartmentNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + department_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) +class OfficeDeanRSPCNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + office_module_DeanRSPC_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class ResearchProceduresNotificationAPIView(APIView): + def post(self, request, *args, **kwargs): + # Extract data from the request, you can customize this based on your needs + sender = request.user + recipient_id = request.data.get('recipient') + type = request.data.get('type') + User = get_user_model() + recipient = User.objects.get(pk=recipient_id) + # Trigger the notification function + research_procedures_notif(sender, recipient, type) + + return Response({'message': 'Notification sent successfully'}, status=status.HTTP_201_CREATED) + +class MarkAsRead(APIView): + + def put(self,request,**args): + notification_id = self.request.query_params.get('id') + notification = get_object_or_404( + Notification, recipient=request.user, id=notification_id) + + notification.mark_as_read() + + return Response({'message': "Successfully marked as read"}, status=status.HTTP_200_OK) + +class Delete(APIView): + + def delete(self,request, **args): + notification_id = self.request.query_params.get('id') + notification = get_object_or_404( + Notification, recipient=request.user, id=notification_id) + + notification.delete() + + return Response({'message': "Notification deleted succesfully"}, status=status.HTTP_200_OK) + +class NotificationsList(ListAPIView): + # queryset = Notification.objects.all(actor_object_id=) + serializer_class = NotificationSerializer + def get_queryset(self): + return Notification.objects.all().filter(recipient_id=self.request.user.id) \ No newline at end of file diff --git a/FusionIIIT/applications/notifications_extension/urls.py b/FusionIIIT/applications/notifications_extension/urls.py index c5b2da49d..b5690994b 100644 --- a/FusionIIIT/applications/notifications_extension/urls.py +++ b/FusionIIIT/applications/notifications_extension/urls.py @@ -4,8 +4,12 @@ from django.conf.urls import include, url from . import views +# from .api import urls + app_name = 'notifications' urlpatterns = [ pattern(r'^mark-as-read-and-redirect/(?P\d+)/$', views.mark_as_read_and_redirect, name='mark_as_read_and_redirect'), + pattern(r'^delete/(?P\d+)/$', views.delete, name='delete'), + url(r'^api/',include('applications.notifications_extension.api.urls')), ] + urlpatterns diff --git a/FusionIIIT/applications/notifications_extension/views.py b/FusionIIIT/applications/notifications_extension/views.py index fc482ef77..59a37547a 100644 --- a/FusionIIIT/applications/notifications_extension/views.py +++ b/FusionIIIT/applications/notifications_extension/views.py @@ -3,9 +3,16 @@ from notifications.utils import id2slug, slug2id from django.shortcuts import get_object_or_404, redirect from notifications.models import Notification - - - +import Fusion.settings as FusionIIIT_settings +def delete(request, slug=None): + notification_id = slug2id(slug) + notification = get_object_or_404( + Notification, recipient=request.user, id=notification_id) + notification.delete() + previous_page = request.META.get('HTTP_REFERER', '/') + # Redirect to the previous page or the home page if the referrer is not available + return HttpResponseRedirect(previous_page) + # return HttpResponseRedirect('dashboard/') def mark_as_read_and_redirect(request, slug=None): notification_id = slug2id(slug) notification = get_object_or_404( @@ -14,8 +21,9 @@ def mark_as_read_and_redirect(request, slug=None): # This conditional statement is True only in # case of complaint_module. + # return redirect('notifications:all') - if(notification.data['module'] == 'Complaint System'): + if(notification.data['module'] == 'Complaint System'): complaint_id=notification.description return HttpResponseRedirect(reverse(notification.data['url'],kwargs={'detailcomp_id1':complaint_id})) else: diff --git a/FusionIIIT/applications/programme_curriculum/models.py b/FusionIIIT/applications/programme_curriculum/models.py index 908afec30..29064ea4f 100644 --- a/FusionIIIT/applications/programme_curriculum/models.py +++ b/FusionIIIT/applications/programme_curriculum/models.py @@ -186,7 +186,6 @@ def courseslots(self): class Course(models.Model): ''' Current Purpose : To store the details regarding a course - @@ -340,7 +339,6 @@ class Meta: unique_together = ('course_id', 'instructor_id', 'batch_id') - def __self__(self): return '{} - {}'.format(self.course_id, self.instructor_id) diff --git a/FusionIIIT/notification/views.py b/FusionIIIT/notification/views.py index 4d55c2b9b..ae7d353d8 100644 --- a/FusionIIIT/notification/views.py +++ b/FusionIIIT/notification/views.py @@ -1,6 +1,6 @@ from django.shortcuts import render +from requests import Response from notifications.signals import notify - # Create your views here. def leave_module_notif(sender, recipient, type, date=None): @@ -69,6 +69,7 @@ def central_mess_notif(sender, recipient, type, message=None): sender = sender recipient = recipient verb = '' + if type == 'feedback_submitted': verb = 'Your feedback has been successfully submitted.' elif type == 'menu_change_accepted': @@ -125,8 +126,6 @@ def healthcare_center_notif(sender, recipient, type): if type == 'amb_req': verb = "You have a new ambulance request" - - notify.send(sender=sender, recipient=recipient, url=url, module=module, verb=verb) @@ -338,7 +337,21 @@ def department_notif(sender, recipient, type): sender = sender recipient = recipient verb = type - flag = "department" + flag = "announcement" + + notify.send(sender=sender, + recipient=recipient, + url=url, + module=module, + verb=verb, + flag=flag) +def examination_notif(sender, recipient, type): + url='examination:examination' + module='examination' + sender = sender + recipient = recipient + verb = type + flag = "announcement" notify.send(sender=sender, recipient=recipient, @@ -386,4 +399,5 @@ def research_procedures_notif(sender,recipient,type): elif type == "created": verb = "A new Patent has been Created" - notify.send(sender=sender,recipient=recipient,url=url,module=module,verb=verb) \ No newline at end of file + notify.send(sender=sender,recipient=recipient,url=url,module=module,verb=verb) + diff --git a/FusionIIIT/templates/dashboard/alerts.html b/FusionIIIT/templates/dashboard/alerts.html index b63276ecd..42edc5df7 100755 --- a/FusionIIIT/templates/dashboard/alerts.html +++ b/FusionIIIT/templates/dashboard/alerts.html @@ -5,7 +5,7 @@
{% for notice in notifications %} {% comment %}A single notification starts here!{% endcomment %} - {% ifnotequal notice.data.flag "department" %} + {% ifnotequal notice.data.flag "announcement" %} {% if notice.unread %}
{% else %} @@ -14,6 +14,9 @@
{{ notice.timesince }} ago diff --git a/FusionIIIT/templates/dashboard/alerts1.html b/FusionIIIT/templates/dashboard/alerts1.html index e2844039f..442570f29 100644 --- a/FusionIIIT/templates/dashboard/alerts1.html +++ b/FusionIIIT/templates/dashboard/alerts1.html @@ -14,6 +14,9 @@
{{ notice.timesince }} ago @@ -27,7 +30,6 @@ {% endifnotequal %}
- {% if notice.unread %}
Mark as Read
diff --git a/FusionIIIT/templates/dashboard/dashboard.html b/FusionIIIT/templates/dashboard/dashboard.html index acc4230fe..172465aca 100644 --- a/FusionIIIT/templates/dashboard/dashboard.html +++ b/FusionIIIT/templates/dashboard/dashboard.html @@ -62,7 +62,7 @@ {% comment %}The Tab-Menu ends here!{% endcomment %} - {% if 'student' != request.user.extrainfo.user_type %} + {% if 'student' == request.user.extrainfo.user_type %} {% comment %}The Tab-Menu starts here!{% endcomment %}
-
+
{% block tab1content1 %} {% include 'libraryModule/issuedItems_content.html' %} {% endblock %} diff --git a/FusionIIIT/templates/libraryModule/libraryModule.html b/FusionIIIT/templates/libraryModule/libraryModule.html index cb617b11c..ac94c2d17 100644 --- a/FusionIIIT/templates/libraryModule/libraryModule.html +++ b/FusionIIIT/templates/libraryModule/libraryModule.html @@ -34,7 +34,7 @@ {% endblock %} {% comment %}The user image card ends here!{% endcomment %} -
+
{% comment %}The Tab-Menu starts here!{% endcomment %} + {% endif%} + {% endif %} + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1f8bfcd0f..1d50f7d05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ amqp==5.0.2 +arabic-reshaper>=2.1.1 asgiref==3.3.1 attrs==20.3.0 beautifulsoup4==4.9.3