mirror of https://github.com/jumpserver/jumpserver
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.
12 lines
382 B
12 lines
382 B
3 years ago
|
from rest_framework import serializers
|
||
|
from django.utils.translation import gettext_lazy as _
|
||
|
|
||
|
|
||
|
class CategoryDisplayMixin(serializers.Serializer):
|
||
|
category_display = serializers.ReadOnlyField(
|
||
|
source='get_category_display', label=_("Category display")
|
||
|
)
|
||
|
type_display = serializers.ReadOnlyField(
|
||
|
source='get_type_display', label=_("Type display")
|
||
|
)
|