You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
727 B
35 lines
727 B
from rest_framework import serializers
|
|
|
|
from apps.course.models import Course
|
|
|
|
|
|
class CourseSerializer(serializers.ModelSerializer):
|
|
|
|
class Meta:
|
|
model = Course
|
|
fields = (
|
|
'id',
|
|
'author',
|
|
'title',
|
|
'short_description',
|
|
'from_author',
|
|
'cover',
|
|
'price',
|
|
'is_infinite',
|
|
'deferred_start_at',
|
|
'category',
|
|
'duration',
|
|
'is_featured',
|
|
'url',
|
|
'status',
|
|
'likes',
|
|
'materials',
|
|
'created_at',
|
|
'update_at',
|
|
)
|
|
|
|
read_only_fields = (
|
|
'id',
|
|
'created_at',
|
|
'update_at',
|
|
)
|
|
|