OpenSlides/openslides/assignments/personal_info.py
Oskar Hahn 0b5f75339e Rename apps and permissions
* Fixed agenda permissions
* Renamed assignment to assignments, fixed assignments permission names
* Renamed mediafile to mediafiles
* Renamed motion to motions. Fixed motions permission names
2015-03-29 20:35:53 +02:00

18 lines
600 B
Python

from django.utils.translation import ugettext_lazy
from openslides.utils.personal_info import PersonalInfo
from .models import Assignment, AssignmentRelatedUser
class AssignmentPersonalInfo(PersonalInfo):
"""
Class for personal info block for the assignment app.
"""
headline = ugettext_lazy('I am candidate for the following elections')
default_weight = 40
def get_queryset(self):
return (Assignment.objects.filter(assignment_related_users__user=self.request.user)
.exclude(assignment_related_users__status=AssignmentRelatedUser.STATUS_BLOCKED))