Refactor mixins

remotes/origin/enhancement/email-actions
David Barragán Merino 2014-05-09 12:16:28 +02:00
parent e8a2b9fbb3
commit e407dd17a3
8 changed files with 10 additions and 8 deletions

View File

@ -25,12 +25,11 @@ from picklefield.fields import PickledObjectField
from taiga.base.models import NeighborsMixin from taiga.base.models import NeighborsMixin
from taiga.base.utils.slug import ref_uniquely from taiga.base.utils.slug import ref_uniquely
from taiga.base.notifications.models import WatchedMixin from taiga.projects.notifications.models import WatchedMixin
from taiga.projects.mixins.blocked.models import BlockedMixin from taiga.projects.mixins.blocked import BlockedMixin
class Issue(NeighborsMixin, WatchedMixin, BlockedMixin, models.Model):
class Issue(NeighborsMixin, WatchedMixin, BlockedMixin):
ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None, ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None,
verbose_name=_("ref")) verbose_name=_("ref"))
owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, default=None, owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, default=None,

View File

@ -14,6 +14,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
##########
# MODELS #
##########
from django.db import models from django.db import models
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.dispatch import receiver from django.dispatch import receiver

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from taiga.projects.mixins.blocked.models import BlockedMixin from taiga.projects.mixins.blocked import BlockedMixin
class BlockedFoo(BlockedMixin): class BlockedFoo(BlockedMixin):

View File

@ -27,9 +27,7 @@ from taiga.base.utils.slug import ref_uniquely
from taiga.projects.notifications.models import WatchedMixin from taiga.projects.notifications.models import WatchedMixin
from taiga.projects.userstories.models import UserStory from taiga.projects.userstories.models import UserStory
from taiga.projects.milestones.models import Milestone from taiga.projects.milestones.models import Milestone
from taiga.projects.mixins.blocked.models import BlockedMixin from taiga.projects.mixins.blocked import BlockedMixin
import reversion
class Task(WatchedMixin, BlockedMixin): class Task(WatchedMixin, BlockedMixin):