12 lines
281 B
Python
12 lines
281 B
Python
from rest_framework import serializers
|
|
from web.models.category import Category
|
|
|
|
|
|
class CategorySerializer(serializers.ModelSerializer):
|
|
# to_representation(self, instance) if needed
|
|
# fk = Serializer()
|
|
|
|
class Meta:
|
|
model = Category
|
|
fields = '__all__'
|
|
|