OpenSlides/openslides/core/apps.py
Norman Jäckel 4f04223e08 Added Django's application configuration.
Used customized AppConfig classes in openslides.core, openslides.account,
openslides.projector, openslides.agenda, openslides.motion, openslides.assignment,
openslides.users, openslides.mediafile, openslides.config.

Refactored loading of signals, template signals and slides.
2014-12-10 17:16:58 +01:00

24 lines
791 B
Python

from django.apps import AppConfig
class CoreAppConfig(AppConfig):
name = 'openslides.core'
verbose_name = 'OpenSlides Core'
def ready(self):
# Load main menu entry and widgets.
# Do this by just importing all from these files.
from . import main_menu, widgets # noqa
# Import all required stuff.
from openslides.config.signals import config_signal
from openslides.projector.api import register_slide_model
from .signals import setup_general_config
# Connect signals.
config_signal.connect(setup_general_config, dispatch_uid='setup_general_config')
# Register slides.
CustomSlide = self.get_model('CustomSlide')
register_slide_model(CustomSlide, 'core/customslide_slide.html')