RateMyCourse/backend/postings/api/serializers.py

19 lines
346 B
Python
Raw Normal View History

2018-09-16 16:52:23 +00:00
from rest_framework import serializers
from postings.models import UniversityReview
class UniversityReviewSerializer(serializers.ModelSerializer):
class Meta:
model = UniversityReview
fields = [
'pk',
'university_name',
'rating',
2018-09-16 16:52:23 +00:00
'title',
'username',
'date_published',
'content',
]
read_only_fields =[
'pk',
]