13 lines
329 B
Python
13 lines
329 B
Python
from rest_framework import serializers
|
|
from .models import Post, PostAnalytics
|
|
|
|
|
|
class PostSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Post
|
|
fields = '__all__'
|
|
|
|
class PostAnalyticsSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = PostAnalytics
|
|
fields = '__all__' |