register contributor in django admin

This commit is contained in:
karthikmurakonda 2023-07-11 19:36:14 +05:30
parent c6b8225ebd
commit e5d76d84e9
2 changed files with 4 additions and 2 deletions

View File

@ -161,3 +161,5 @@ class PrePlacementOffer(PrePlacementOfferAdmin):
def Student(self, obj):
return model_admin_url(obj.student)
admin.site.register(Contributor)

View File

@ -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