diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py index c8098803a..253ec9d47 100644 --- a/openslides/agenda/models.py +++ b/openslides/agenda/models.py @@ -11,7 +11,6 @@ from django.utils.translation import ugettext_lazy, ugettext_noop from openslides.core.config import config from openslides.core.models import Tag -from openslides.projector.models import SlideMixin from openslides.users.models import User from openslides.utils.exceptions import OpenSlidesError from openslides.utils.models import RESTModelMixin @@ -82,7 +81,7 @@ class ItemManager(models.Manager): weight=weight) -class Item(RESTModelMixin, SlideMixin, models.Model): +class Item(RESTModelMixin, models.Model): """ An Agenda Item """ @@ -303,19 +302,6 @@ class Item(RESTModelMixin, SlideMixin, models.Model): # The list of speakers is empty. return None - def is_active_slide(self): - """ - Returns True if the slide is active. If the slide is a related item, - Returns True if the related object is active. - """ - if super(Item, self).is_active_slide(): - value = True - elif self.content_object and isinstance(self.content_object, SlideMixin): - value = self.content_object.is_active_slide() - else: - value = False - return value - @property def item_no(self): item_no = None diff --git a/openslides/assignments/models.py b/openslides/assignments/models.py index d07465168..b2160090e 100644 --- a/openslides/assignments/models.py +++ b/openslides/assignments/models.py @@ -14,7 +14,6 @@ from openslides.poll.models import ( CollectDefaultVotesMixin, PublishPollMixin, ) -from openslides.projector.models import SlideMixin from openslides.users.models import User from openslides.utils.exceptions import OpenSlidesError from openslides.utils.models import RESTModelMixin @@ -55,7 +54,7 @@ class AssignmentRelatedUser(RESTModelMixin, models.Model): return self.assignment -class Assignment(RESTModelMixin, SlideMixin, models.Model): +class Assignment(RESTModelMixin, models.Model): slide_callback_name = 'assignment' PHASE_SEARCH = 0 @@ -338,7 +337,7 @@ class AssignmentOption(RESTModelMixin, BaseOption): return self.poll.assignment -class AssignmentPoll(RESTModelMixin, SlideMixin, CollectDefaultVotesMixin, +class AssignmentPoll(RESTModelMixin, CollectDefaultVotesMixin, PublishPollMixin, BasePoll): slide_callback_name = 'assignmentpoll' option_class = AssignmentOption diff --git a/openslides/mediafiles/models.py b/openslides/mediafiles/models.py index 810b27921..d645d9948 100644 --- a/openslides/mediafiles/models.py +++ b/openslides/mediafiles/models.py @@ -4,12 +4,11 @@ from django.db import models from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy, ugettext_noop -from openslides.projector.models import SlideMixin from openslides.users.models import User from openslides.utils.models import RESTModelMixin -class Mediafile(RESTModelMixin, SlideMixin, models.Model): +class Mediafile(RESTModelMixin, models.Model): """ Class for uploaded files which can be delivered under a certain url. """ diff --git a/openslides/motions/models.py b/openslides/motions/models.py index 2919d2adc..170e4f586 100644 --- a/openslides/motions/models.py +++ b/openslides/motions/models.py @@ -15,14 +15,13 @@ from openslides.poll.models import ( BaseVote, CollectDefaultVotesMixin, ) -from openslides.projector.models import SlideMixin from openslides.users.models import User from openslides.utils.models import RESTModelMixin from .exceptions import WorkflowError -class Motion(RESTModelMixin, SlideMixin, models.Model): +class Motion(RESTModelMixin, models.Model): """ The Motion Class. @@ -660,8 +659,7 @@ class MotionOption(RESTModelMixin, BaseOption): return self.poll.motion -class MotionPoll(RESTModelMixin, SlideMixin, CollectDefaultVotesMixin, - BasePoll): +class MotionPoll(RESTModelMixin, CollectDefaultVotesMixin, BasePoll): """The Class to saves the vote result for a motion poll.""" slide_callback_name = 'motionpoll' diff --git a/openslides/projector/__init__.py b/openslides/projector/__init__.py deleted file mode 100644 index f610c41af..000000000 --- a/openslides/projector/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = 'openslides.projector.apps.ProjectorAppConfig' diff --git a/openslides/projector/models.py b/openslides/projector/models.py deleted file mode 100644 index 1066f7f8c..000000000 --- a/openslides/projector/models.py +++ /dev/null @@ -1,8 +0,0 @@ -class SlideMixin(object): - """ - Deprecated. - - Will be reused or removed when more slides are implemented for the - OpenSlides 2.0 projector API - """ - pass diff --git a/openslides/users/models.py b/openslides/users/models.py index d33cbd272..534dd4be5 100644 --- a/openslides/users/models.py +++ b/openslides/users/models.py @@ -14,7 +14,6 @@ from django.db import models from django.utils.translation import ugettext_lazy, ugettext_noop from openslides.core.config import config -from openslides.projector.models import SlideMixin from openslides.utils.models import RESTModelMixin from .exceptions import UserError @@ -87,7 +86,7 @@ class UserManager(BaseUserManager): return ''.join([choice(chars) for i in range(size)]) -class User(RESTModelMixin, SlideMixin, PermissionsMixin, AbstractBaseUser): +class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser): """ Model for users in OpenSlides. A client can login as a user with credentials. A user can also just be used as representation for a person