This repository has been archived on 2022-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
webdev/website/blog/serializers.py
2021-12-25 04:03:45 +05:30

10 lines
271 B
Python

from django.contrib.auth.models import User
from .models import *
from rest_framework import serializers
class PostSerializer(serializers.ModelSerializer):
class Meta:
model = Post
# better to explicitly mention the fields
fields = '__all__'