diff --git a/openslides/config/templates/config/version.html b/openslides/config/templates/config/version.html index f325f5f7f..36b9eddaa 100644 --- a/openslides/config/templates/config/version.html +++ b/openslides/config/templates/config/version.html @@ -7,5 +7,7 @@ {% block content %}

{% trans "Version" %}

-

{% trans "OpenSlides Version" %}: {{ version }}

+ {% for version in versions %} +

{{ version.0 }} {% trans "Version" %}: {{ version.1 }}

+ {% endfor %} {% endblock %} diff --git a/openslides/config/views.py b/openslides/config/views.py index 05770d7f0..aa89afc78 100644 --- a/openslides/config/views.py +++ b/openslides/config/views.py @@ -16,6 +16,8 @@ from django.contrib import messages from django.contrib.auth.models import Group, Permission from django.utils.translation import ugettext as _ from django.template.loader import render_to_string +from django.utils.importlib import import_module +import settings from openslides import get_version @@ -25,7 +27,6 @@ from utils.template import Tab from forms import GeneralConfigForm - from models import config @@ -85,7 +86,20 @@ class VersionConfig(TemplateView): def get_context_data(self, **kwargs): context = super(VersionConfig, self).get_context_data(**kwargs) - context['version'] = get_version() + context['versions'] = [('OpenSlides', get_version())] + for plugin in settings.INSTALLED_PLUGINS: + try: + mod = import_module(plugin) + plugin_version = get_version(mod.VERSION) + except (ImportError, AttributeError, AssertionError): + continue + try: + plugin_name = mod.NAME + except AttributeError: + plugin_name = mod.__name__.split('.')[0] + + context['versions'].append((plugin_name, plugin_version)) + return context