__init__.py 831 Bytes
Newer Older
1

Lukas Burgey's avatar
Lukas Burgey committed
2
3
# stupid python circular imports
# pylint: disable=wrong-import-position
4
5
6
7

from django.contrib.auth.models import Group
from rest_framework import serializers

Lukas Burgey's avatar
Lukas Burgey committed
8
from ... import models
9
10
11
12
13
14
15
16
17
18
19
20
21


class GroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = Group
        fields = [
            'id',
            'name',
        ]


class SSHPublicKeySerializer(serializers.ModelSerializer):
    class Meta:
Lukas Burgey's avatar
Lukas Burgey committed
22
        model = models.SSHPublicKey
23
24
25
26
27
28
29
30
31
        fields = [
            'id',
            'name',
            'key',
        ]


class SSHPublicKeyRefSerializer(serializers.ModelSerializer):
    class Meta:
Lukas Burgey's avatar
Lukas Burgey committed
32
        model = models.SSHPublicKey
33
34
35
36
        fields = [
            'id',
            'name',
        ]
Lukas Burgey's avatar
Lukas Burgey committed
37
38
39


# "exports"
40
from .webpage import NewDeploymentSerializer
Lukas Burgey's avatar
Lukas Burgey committed
41
from .clients import RabbitMQInstanceSerializer