Skip to content

Commit

Permalink
Adding models.Model explicitly to tagged models
Browse files Browse the repository at this point in the history
  • Loading branch information
Anler Hp committed Jun 23, 2014
1 parent 66071b5 commit 7ebe443
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion taiga/projects/issues/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from taiga.projects.mixins.blocked import BlockedMixin


class Issue(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin):
class Issue(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model):
ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None,
verbose_name=_("ref"))
owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, default=None,
Expand Down
2 changes: 1 addition & 1 deletion taiga/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Meta:
abstract = True


class Project(ProjectDefaults, TaggedMixin):
class Project(ProjectDefaults, TaggedMixin, models.Model):
name = models.CharField(max_length=250, unique=True, null=False, blank=False,
verbose_name=_("name"))
slug = models.SlugField(max_length=250, unique=True, null=False, blank=True,
Expand Down
2 changes: 1 addition & 1 deletion taiga/projects/tasks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from taiga.projects.mixins.blocked import BlockedMixin


class Task(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin):
class Task(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model):
user_story = models.ForeignKey("userstories.UserStory", null=True, blank=True,
related_name="tasks", verbose_name=_("user story"))
ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None,
Expand Down
2 changes: 1 addition & 1 deletion taiga/projects/userstories/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __str__(self):
return "{}: {}".format(self.role.name, self.points.name)


class UserStory(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin):
class UserStory(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model):

ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None,
verbose_name=_("ref"))
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_tags.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import pytest

from django.db import models

from taiga.base import tags

pytestmark = pytest.mark.django_db


class TaggedModel(tags.TaggedMixin):
class TaggedModel(tags.TaggedMixin, models.Model):
class Meta:
app_label = "base"

Expand Down

0 comments on commit 7ebe443

Please sign in to comment.