# Path: api/serializers.py
# class UserSerializer(serializers.ModelSerializer):
# 
#     class Meta:
#         model = User
#         fields = ('username', 'is_staff')


from django.shortcuts import render
from django.contrib.auth.models import User
from rest_framework.response import Response
from rest_framework.decorators import api_view
from api.serializers import UserSerializer


@api_view(['GET'])
def index(request):
    return render(request, 'api/index.html')


# Path: api/serializers.py
# class UserSerializer(serializers.ModelSerializer):
# 
#     class Meta:
#         model = User
#         fields = ('username', 'is_staff')


# Path: api/views.py
from django.shortcuts import render
from django.contrib.auth.models import User
from rest_framework.response import Response
from rest_framework.decorators import api_view
from api.serializers import UserSerializer



@api_view(['GET'])
def index(request):
    return render(request, 'api/index.html')


@api_view(['GET'])