Adding OCC to games

remotes/origin/endpoint-for-estimation-system
Jesús Espino 2017-06-12 12:53:46 +02:00
parent bc48e5f8df
commit 2b6e28daf0
2 changed files with 4 additions and 2 deletions

View File

@ -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
@ -819,7 +820,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

View File

@ -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
@ -1135,7 +1136,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,