From e5d76d84e95614e33d275ed7eb9948fce775b419 Mon Sep 17 00:00:00 2001 From: karthikmurakonda Date: Tue, 11 Jul 2023 19:36:14 +0530 Subject: [PATCH] register contributor in django admin --- CDC_Backend/APIs/admin.py | 2 ++ CDC_Backend/APIs/studentViews.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CDC_Backend/APIs/admin.py b/CDC_Backend/APIs/admin.py index 08ac51b..6f64f1e 100644 --- a/CDC_Backend/APIs/admin.py +++ b/CDC_Backend/APIs/admin.py @@ -161,3 +161,5 @@ class PrePlacementOffer(PrePlacementOfferAdmin): def Student(self, obj): return model_admin_url(obj.student) + +admin.site.register(Contributor) \ No newline at end of file diff --git a/CDC_Backend/APIs/studentViews.py b/CDC_Backend/APIs/studentViews.py index b595dd8..3e47e20 100644 --- a/CDC_Backend/APIs/studentViews.py +++ b/CDC_Backend/APIs/studentViews.py @@ -261,8 +261,8 @@ def deleteApplication(request, id, email, user_type): @api_view(['GET']) -@isAuthorized(allowed_users='*') -def getContributorStats(request, id, email, user_type): +# @isAuthorized(allowed_users='*') +def getContributorStats(request): try: contributors = Contributor.objects.all() serialized_data = ContributorSerializer(contributors, many=True).data