Chat with Angular and Django./ Backend. Users list. Media.

Make a new serializer UserProfileSerializer in account/serializers/

Create a new UserListView class in the account/views/

Add a new routing in account/


Define a custom pager class in backend/

Include the CustomPagination in the

from rest_framework import serializers
from account.models import UserProfile

class UserProfileSerializer(serializers.ModelSerializer):

    class Meta:
        model = UserProfile
        fields = [
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, AllowAny
from rest_framework import generics
from account.models import UserProfile
from account.serializers.profile import UserProfileSerializer

class UserListView(generics.ListAPIView):

    List of users.


    queryset = UserProfile.objects.all().order_by('-id')
    serializer_class = UserProfileSerializer
    permission_classes = (AllowAny,)
Потратить 2 кредита и начать обучение! У вас кредитов(а)
Задать вопрос, прокомментировать.