mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-17 02:45:08 +00:00
added optional name as user
This commit is contained in:
@ -44,7 +44,7 @@ class AnalyticsViewSet(GenericViewSet):
|
|||||||
to get junior leaderboard and ranking
|
to get junior leaderboard and ranking
|
||||||
"""
|
"""
|
||||||
serializer_class = None
|
serializer_class = None
|
||||||
# permission_classes = [IsAuthenticated, AdminPermission]
|
permission_classes = [IsAuthenticated, AdminPermission]
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
user_qs = USER.objects.filter(
|
user_qs = USER.objects.filter(
|
||||||
@ -205,7 +205,7 @@ class AnalyticsViewSet(GenericViewSet):
|
|||||||
)).order_by('-total_points', 'junior__created_at')[:15]
|
)).order_by('-total_points', 'junior__created_at')[:15]
|
||||||
df_leaderboard = pd.DataFrame([
|
df_leaderboard = pd.DataFrame([
|
||||||
{
|
{
|
||||||
'Junior Name': get_user_full_name(junior.junior.auth),
|
'Name': get_user_full_name(junior.junior.auth),
|
||||||
'Points': junior.total_points,
|
'Points': junior.total_points,
|
||||||
'Rank': junior.rank
|
'Rank': junior.rank
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user