Exemplo n.º 1
0
 def get_context_data(self, **kwargs):
     """
     Adds version strings to the context.
     """
     context = super().get_context_data(**kwargs)
     # OpenSlides version. During development the git commit id is added.
     if RELEASE:
         description = ''
     else:
         description = 'Commit %s' % get_git_commit_id()
     context['modules'] = [{
         'verbose_name': 'OpenSlides',
         'description': description,
         'version': get_openslides_version()
     }]
     # Versions of plugins.
     for plugin in settings.INSTALLED_PLUGINS:
         context['modules'].append({
             'verbose_name':
             get_plugin_verbose_name(plugin),
             'description':
             get_plugin_description(plugin),
             'version':
             get_plugin_version(plugin)
         })
     return context
Exemplo n.º 2
0
 def get_context_data(self, **context):
     result = dict(openslides_version=version, plugins=[])
     # Versions of plugins.
     for plugin in settings.INSTALLED_PLUGINS:
         result['plugins'].append({
             'verbose_name': get_plugin_verbose_name(plugin),
             'description': get_plugin_description(plugin),
             'version': get_plugin_version(plugin)})
     return result
Exemplo n.º 3
0
 def get_context_data(self, **context):
     result = dict(openslides_version=version, plugins=[])
     # Versions of plugins.
     for plugin in settings.INSTALLED_PLUGINS:
         result['plugins'].append({
             'verbose_name':
             get_plugin_verbose_name(plugin),
             'description':
             get_plugin_description(plugin),
             'version':
             get_plugin_version(plugin)
         })
     return result
Exemplo n.º 4
0
 def get_context_data(self, **kwargs):
     """
     Adds version strings to the context.
     """
     context = super(VersionView, self).get_context_data(**kwargs)
     # OpenSlides version. During development the git commit id is added.
     if RELEASE:
         description = ''
     else:
         description = 'Commit %s' % get_git_commit_id()
     context['modules'] = [{'verbose_name': 'OpenSlides',
                            'description': description,
                            'version': get_openslides_version()}]
     # Versions of plugins.
     for plugin in settings.INSTALLED_PLUGINS:
         context['modules'].append({'verbose_name': get_plugin_verbose_name(plugin),
                                    'description': get_plugin_description(plugin),
                                    'version': get_plugin_version(plugin)})
     return context