1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Merge Role and RolePermissions

This commit is contained in:
Yohann D'ANELLO
2020-07-25 19:40:30 +02:00
parent 0b6cb4ef19
commit fb5e2578af
17 changed files with 135 additions and 274 deletions

View File

@ -3,7 +3,7 @@
from rest_framework import serializers
from ..models import Permission, RolePermissions
from ..models import Permission, Role
class PermissionSerializer(serializers.ModelSerializer):
@ -17,12 +17,12 @@ class PermissionSerializer(serializers.ModelSerializer):
fields = '__all__'
class RolePermissionsSerializer(serializers.ModelSerializer):
class RoleSerializer(serializers.ModelSerializer):
"""
REST API Serializer for RolePermissions types.
The djangorestframework plugin will analyse the model `RolePermissions` and parse all fields in the API.
REST API Serializer for Role types.
The djangorestframework plugin will analyse the model `Role` and parse all fields in the API.
"""
class Meta:
model = RolePermissions
model = Role
fields = '__all__'