add signal callback to provide defaults

This commit is contained in:
Stefan Frauenknecht 2013-02-20 23:50:34 +01:00
parent f81abe215f
commit 45856fc9b0
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
"""
openslides.agenda
~~~~~~~~~~~~~~~~~
The OpenSlides agenda app appends the functionality to OpenSlides to
manage agendas.
:copyright: (c) 2011-2013 by the OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
import openslides.agenda.signals

View File

@ -0,0 +1,22 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
openslides.agenda.signals
~~~~~~~~~~~~~~~~~~~~~~~~~
Signals for the agenda app.
:copyright: (c) 2011-2013 by the OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
from django.dispatch import receiver
from openslides.config.signals import default_config_value
@receiver(default_config_value, dispatch_uid="agenda_default_config")
def default_config(sender, key, **kwargs):
"""Return the default config values for the agenda app."""
return {
'agenda_start_event_date_time': ''}.get(key)