OpenSlides/openslides/motion/slides.py
Oskar Hahn ecf5248962 Rework of the projector with websocket
* Set a static projector title
* absolute_urls for the activate links
* update the projector when a slide changes (in save())
* insert the absolute_url template filter
* Preview to slides
* renamed is_active to is_active_slide
* The SlideMixin has to come before the PersonMixin
* Update list of speakers
* Render Countdown via JS
* Reconnect projector after connection lost
* Overlays can allways be active and do not appear in the widget
* Rewrote the clock as overlay
2013-09-24 23:35:05 +02:00

36 lines
827 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
openslides.motion.slides
~~~~~~~~~~~~~~~~~~~~~~~~
Defines the slides for the motion app.
:copyright: (c) 20112013 by the OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
from django.template.loader import render_to_string
from openslides.projector.api import register_slide
from .models import Motion
def motion_slide(**kwargs):
"""
Slide for the motion app.
"""
motion_pk = kwargs.get('pk', None)
try:
motion = Motion.objects.get(pk=motion_pk)
except Motion.DoesNotExist:
return ''
context = {
'motion': motion,
'title': motion.title}
return render_to_string('motion/slide.html', context)
register_slide(Motion.slide_callback_name, motion_slide)