taggedItem.py 408 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
from django.db import models
from backend.models.module import BasicModule, BasicModuleSerializer, BasicModuleViewSet
from .tag import Tag


class TaggedItem(BasicModule):
    tag = models.ForeignKey(Tag, related_name='+', on_delete=models.PROTECT)

    class Meta:
        abstract = True


class TaggedItemSerializer(BasicModuleSerializer):
    pass


class TaggedItemViewSet(BasicModuleViewSet):
    pass