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.

9 lines
187 B

  1. from rest_framework import serializers
  2. from .models import Role
  3. class RoleSerializer(serializers.ModelSerializer):
  4. class Meta:
  5. model = Role
  6. fields = ('id', 'name')