OpenSlides/openslides/assignment/personal_info.py
Oskar Hahn c4c9322321 Rework of assignment
fixes: #1429, #1345

A database recreation is needed
2015-02-12 10:14:10 +01: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))