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
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
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
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