2016-06-02 12:47:01 +02:00
|
|
|
from django.core.validators import MaxLengthValidator
|
2016-09-17 22:26:23 +02:00
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
from openslides.core.config import ConfigVariable
|
|
|
|
|
|
|
|
|
|
|
|
def get_config_variables():
|
|
|
|
"""
|
|
|
|
Generator which yields all config variables of this app.
|
|
|
|
|
|
|
|
There are two main groups: 'General' and 'Projector'. The group 'General'
|
|
|
|
has subgroups. The generator has to be evaluated during app loading
|
|
|
|
(see apps.py).
|
|
|
|
"""
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_name',
|
|
|
|
default_value='OpenSlides',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event name',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=110,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-09-01 15:32:59 +02:00
|
|
|
validators=(MaxLengthValidator(100),))
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_description',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='Presentation and assembly system',
|
|
|
|
label='Short description of event',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=115,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
validators=(MaxLengthValidator(100),),
|
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_date',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event date',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=120,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_location',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event location',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=125,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_organizer',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event organizer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=130,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_legal_notice',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='<a href="http://www.openslides.org">OpenSlides</a> is a '
|
|
|
|
'free web based presentation and assembly system for '
|
|
|
|
'visualizing and controlling agenda, motions and '
|
|
|
|
'elections of an assembly.',
|
2016-06-02 12:47:01 +02:00
|
|
|
input_type='text',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Legal notice',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=132,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_welcome_title',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='Welcome to OpenSlides',
|
|
|
|
label='Front page title',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=134,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_welcome_text',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='[Space for your welcome text.]',
|
2016-06-02 12:47:01 +02:00
|
|
|
input_type='text',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Front page text',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=136,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
# General System
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_system_enable_anonymous',
|
|
|
|
default_value=False,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Allow access for anonymous guest users',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=138,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='System')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_login_info_text',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Show this text on the login page.',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=140,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='System')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
# Projector
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_enable_logo',
|
|
|
|
default_value=True,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Show logo on projector',
|
|
|
|
help_text='You can replace the logo. Just copy a file to '
|
|
|
|
'"static/img/logo-projector.png" in your OpenSlides data path.',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=150,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_enable_title',
|
|
|
|
default_value=True,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Show title and description of event on projector',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=155,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_header_backgroundcolor',
|
|
|
|
default_value='#317796',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Background color of projector header and footer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=160,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_header_fontcolor',
|
|
|
|
default_value='#F5F5F5',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Font color of projector header and footer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=165,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_h1_fontcolor',
|
|
|
|
default_value='#317796',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Font color of projector headline',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=170,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_default_countdown',
|
|
|
|
default_value=60,
|
2016-08-03 21:03:40 +02:00
|
|
|
input_type='integer',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Default countdown',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=185,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-08-25 16:40:34 +02:00
|
|
|
|
|
|
|
# set the resolution for one projector. It can be removed with the multiprojector feature.
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_resolution',
|
|
|
|
default_value={'width': 1024, 'height': 768},
|
|
|
|
input_type='resolution',
|
|
|
|
label='Projector Resolution',
|
|
|
|
weight=200,
|
|
|
|
group='Projector')
|