forTestingModeration.py 662 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from .myModel import MyModel
from .myModelSerializer import MyModelSerializer
from .myModelViewSet import MyModelViewSet
from django.db import models


class ForTestingModeration(MyModel):
    """
        Simple model for testing purposes
    """
    aaa = models.CharField(max_length=100)


class ForTestingModerationSerializer(MyModelSerializer):
    """
        Same as above
    """
    class Meta:
        model = ForTestingModeration
        fields = '__all__'


class ForTestingModerationViewSet(MyModelViewSet):
    """
        Same as above
    """
    serializer_class = ForTestingModerationSerializer
    queryset = ForTestingModeration.objects.all()