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