forTestingVersionning.py 720 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
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 .myModelVersionned import MyModelVersionned, MyModelVersionnedSerializer, MyModelVersionnedViewSet
from django.db import models
import reversion


@reversion.register()
class ForTestingVersionning(MyModelVersionned):
    """
        Simple model for testing purposes
    """
    bbb = models.CharField(max_length=100)


class ForTestingVersionningSerializer(MyModelVersionnedSerializer):
    """
        Same as above
    """
    class Meta:
        model = ForTestingVersionning
        fields = '__all__'


class ForTestingVersionningViewSet(MyModelVersionnedViewSet):
    """
        Same as above
    """
    serializer_class = ForTestingVersionningSerializer
    queryset = ForTestingVersionning.objects.all()