Adding OCC to games
parent
9b911bc2cd
commit
953da1b5c2
|
@ -52,6 +52,7 @@ from taiga.projects.mixins.ordering import BulkUpdateOrderMixin
|
|||
from taiga.projects.tasks.models import Task
|
||||
from taiga.projects.tagging.api import TagsColorsResourceMixin
|
||||
from taiga.projects.userstories.models import UserStory, RolePoints
|
||||
from taiga.projects.occ import OCCResourceMixin
|
||||
from taiga.users import services as users_services
|
||||
|
||||
from . import filters as project_filters
|
||||
|
@ -1030,7 +1031,7 @@ class InvitationViewSet(ModelListViewSet):
|
|||
raise exc.PermissionDenied(_("You don't have permisions to see that."))
|
||||
|
||||
|
||||
class GameViewSet(ModelCrudViewSet):
|
||||
class GameViewSet(OCCResourceMixin, ModelCrudViewSet):
|
||||
model = models.Game
|
||||
serializer_class = serializers.GameSerializer
|
||||
validator_class = validators.GameValidator
|
||||
|
|
|
@ -40,6 +40,7 @@ from taiga.projects.custom_attributes.models import TaskCustomAttribute
|
|||
from taiga.projects.custom_attributes.models import IssueCustomAttribute
|
||||
from taiga.projects.tagging.models import TaggedMixin
|
||||
from taiga.projects.tagging.models import TagsColorsMixin
|
||||
from taiga.projects.occ import OCCModelMixin
|
||||
from taiga.base.utils.files import get_file_path
|
||||
from taiga.base.utils.slug import slugify_uniquely
|
||||
from taiga.base.utils.slug import slugify_uniquely_for_queryset
|
||||
|
@ -1265,7 +1266,7 @@ class ProjectTemplate(TaggedMixin, TagsColorsMixin, models.Model):
|
|||
return project
|
||||
|
||||
|
||||
class Game(models.Model):
|
||||
class Game(OCCModelMixin, models.Model):
|
||||
uuid = models.CharField(max_length=32, editable=False, null=True,
|
||||
blank=True, default=None, db_index=True)
|
||||
name = models.CharField(max_length=250, null=False, blank=False,
|
||||
|
|
Loading…
Reference in New Issue