2014-11-13 22:23:16 +01:00
|
|
|
from django.apps import AppConfig
|
|
|
|
|
|
|
|
|
2015-07-01 17:48:41 +02:00
|
|
|
class MediafilesAppConfig(AppConfig):
|
2015-03-26 05:36:10 +01:00
|
|
|
name = 'openslides.mediafiles'
|
|
|
|
verbose_name = 'OpenSlides Mediafiles'
|
2015-07-01 17:48:41 +02:00
|
|
|
angular_site_module = True
|
|
|
|
angular_projector_module = True
|
2015-10-22 00:01:51 +02:00
|
|
|
js_files = ['js/mediafiles/base.js', 'js/mediafiles/site.js', 'js/mediafiles/projector.js']
|
2014-11-13 22:23:16 +01:00
|
|
|
|
|
|
|
def ready(self):
|
2015-06-25 20:36:46 +02:00
|
|
|
# Load projector elements.
|
|
|
|
# Do this by just importing all from these files.
|
|
|
|
from . import projector # noqa
|
|
|
|
|
2014-11-13 22:23:16 +01:00
|
|
|
# Import all required stuff.
|
2015-01-24 16:35:50 +01:00
|
|
|
from openslides.utils.rest_api import router
|
|
|
|
from .views import MediafileViewSet
|
2014-11-13 22:23:16 +01:00
|
|
|
|
2015-01-24 16:35:50 +01:00
|
|
|
# Register viewsets.
|
2016-02-11 22:58:32 +01:00
|
|
|
router.register(self.get_model('Mediafile').get_collection_string(), MediafileViewSet)
|