from rest_framework import generics
from models import Post,Author
from serializers import PostSerializer, AuthorSerializer
# Create your views here.


class PostList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset=Post.objects.all()
    serializer_class=PostSerializer


class PostDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Gets a detailed view of an individual post record. Can be updated
    and deleted. Each post must
    be assigned to a author
    """
    queryset=Post.objects.all()
    serializer_class=PostSerializer

class AuthorList(generics.ListCreateAPIView):
    """
    List and create Posts
    """

    queryset=Author.objects.all()
    serializer_class=AuthorSerializer


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Returns the details on an author
    """
    queryset=Author.objects.all()
    serializer_class=AuthorSerializer

a22f031c1783c6f3fa833f6f27849ff2c477a042
<mask token>


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class PostDetails(generics.RetrieveUpdateDestroyAPIView):
    <mask token>
    queryset = Post.objects.all()
    serializer_class = PostSerializer


class AuthorList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Returns the details on an author
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer

<mask token>


class PostList(generics.ListCreateAPIView):
    <mask token>
    <mask token>
    <mask token>


class PostDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Gets a detailed view of an individual post record. Can be updated
    and deleted. Each post must
    be assigned to a author
    """
    queryset = Post.objects.all()
    serializer_class = PostSerializer


class AuthorList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Returns the details on an author
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer

from rest_framework import generics
from models import Post, Author
from serializers import PostSerializer, AuthorSerializer


class PostList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset = Post.objects.all()
    serializer_class = PostSerializer


class PostDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Gets a detailed view of an individual post record. Can be updated
    and deleted. Each post must
    be assigned to a author
    """
    queryset = Post.objects.all()
    serializer_class = PostSerializer


class AuthorList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Returns the details on an author
    """
    queryset = Author.objects.all()
    serializer_class = AuthorSerializer

from rest_framework import generics
from models import Post,Author
from serializers import PostSerializer, AuthorSerializer
# Create your views here.


class PostList(generics.ListCreateAPIView):
    """
    List and create Posts
    """
    queryset=Post.objects.all()
    serializer_class=PostSerializer


class PostDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Gets a detailed view of an individual post record. Can be updated
    and deleted. Each post must
    be assigned to a author
    """
    queryset=Post.objects.all()
    serializer_class=PostSerializer

class AuthorList(generics.ListCreateAPIView):
    """
    List and create Posts
    """

    queryset=Author.objects.all()
    serializer_class=AuthorSerializer


class AuthorDetails(generics.RetrieveUpdateDestroyAPIView):
    """
    Returns the details on an author
    """
    queryset=Author.objects.all()
    serializer_class=AuthorSerializer
