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/posts/serializers.py

10 lines
271 B
Python
Raw Normal View History

2021-12-24 23:33:45 +01:00
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__'