コード例 #1
0
ファイル: models.py プロジェクト: lesteenman/OpenSlides
 def end_speech(self):
     """
     The speech is finished. Set the time to now.
     """
     self.end_time = timezone.now()
     self.save()
     if config['agenda_couple_countdown_and_speakers']:
         Countdown.control(action='stop')
コード例 #2
0
ファイル: models.py プロジェクト: lostwarrior404/OpenSlides
 def end_speech(self):
     """
     The speech is finished. Set the time to now.
     """
     self.end_time = timezone.now()
     self.save()
     if config['agenda_couple_countdown_and_speakers']:
         Countdown.control(action='stop')
コード例 #3
0
ファイル: models.py プロジェクト: munasharma/OpenSlides
    def begin_speech(self):
        """
        Let the user speak.

        Set the weight to None and the time to now. If anyone is still
        speaking, end his speech.
        """
        try:
            actual_speaker = Speaker.objects.filter(item=self.item, end_time=None).exclude(begin_time=None).get()
        except Speaker.DoesNotExist:
            pass
        else:
            actual_speaker.end_speech()
        self.weight = None
        self.begin_time = datetime.now()
        self.save()
        if config['agenda_couple_countdown_and_speakers']:
            Countdown.control(action='reset')
            Countdown.control(action='start')
コード例 #4
0
ファイル: models.py プロジェクト: lostwarrior404/OpenSlides
    def begin_speech(self):
        """
        Let the user speak.

        Set the weight to None and the time to now. If anyone is still
        speaking, end his speech.
        """
        try:
            current_speaker = (Speaker.objects.filter(
                item=self.item, end_time=None).exclude(begin_time=None).get())
        except Speaker.DoesNotExist:
            pass
        else:
            current_speaker.end_speech()
        self.weight = None
        self.begin_time = timezone.now()
        self.save()
        if config['agenda_couple_countdown_and_speakers']:
            Countdown.control(action='reset')
            Countdown.control(action='start')