updated settings | random social_links returned now
This commit is contained in:
@@ -45,6 +45,11 @@ class SocialLinksAPIView(generics.ListAPIView):
|
||||
queryset = SocialLink.objects.all()[:50]
|
||||
permission_classes = [HasAPIKey]
|
||||
|
||||
def get_queryset(self):
|
||||
social_links = list(SocialLink.objects.all()[:96])
|
||||
queryset = random.sample(social_links, 32)
|
||||
return queryset
|
||||
|
||||
|
||||
class SocialImgsAPIView(generics.ListAPIView):
|
||||
serializer_class = SocialImgsSerializer
|
||||
|
||||
Reference in New Issue
Block a user