Skip to content
Snippets Groups Projects
Verified Commit 668885f0 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Include licence information from __init__.py

parent 96958a7e
No related branches found
No related tags found
1 merge request!146Resolve "Add licence information page"
Pipeline #803 passed with warnings
import pkg_resources
from django.utils.translation import gettext_lazy as _
try:
from .celery import app as celery_app
except ModuleNotFoundError:
......@@ -12,3 +14,18 @@ except Exception:
__version__ = "unknown"
default_app_config = "aleksis.core.apps.CoreConfig"
LICENCE_INFORMATION = {
"name": _("Core"),
"repository": "https://edugit.org/AlekSIS/AlekSIS/",
"licence": _("EUPL, version 1.2 or later"),
"copyright_holders": [
([2017, 2018, 2019, 2020], "Jonathan Weth", "wethjo@katharineum.de"),
([2017, 2018, 2019], "Frank Poetzsch-Heffter", "p-h@katharineum.de"),
([2018, 2019, 2020], "Hangzhi Yu", "yuha@katharineum.de"),
([2018, 2019, 2020], "Julian Leucker", "leuckeju@katharineum.de"),
([2019, 2020], "Dominik George", "dominik.george@teckids.org"),
([2019, 2020], "mirabilos", "thorsten.glaser@teckids.org"),
([2019, 2020], "Tom Teichler", "tom.teichler@teckids.org"),
]
}
import os
import sys
from glob import glob
from importlib import import_module
from django.apps import apps
from django.utils.translation import gettext_lazy as _
from calendarweek.django import i18n_day_name_choices_lazy
......@@ -479,21 +481,15 @@ CKEDITOR_CONFIGS = {
}
}
LICENCE_INFORMATION = {
"core": {
"name": _("Core"),
"repository": "https://edugit.org/AlekSIS/AlekSIS/",
"licence": _("EUPL, version 1.2 or later"),
"copyright_holders": [
([2017, 2018, 2019, 2020], "Jonathan Weth", "wethjo@katharineum.de"),
([2017, 2018, 2019], "Frank Poetzsch-Heffter", "p-h@katharineum.de"),
([2018, 2019, 2020], "Hangzhi Yu", "yuha@katharineum.de"),
([2018, 2019, 2020], "Julian Leucker", "leuckeju@katharineum.de"),
([2019, 2020], "Dominik George", "dominik.george@teckids.org"),
([2019, 2020], "mirabilos", "thorsten.glaser@teckids.org"),
([2019, 2020], "Tom Teichler", "tom.teichler@teckids.org"),
]
}
}
LICENCE_INFORMATION = []
packages = list(get_app_packages())
packages.insert(0, "aleksis.core")
merge_app_settings("LICENCE_INFORMATION", LICENCE_INFORMATION, False)
for app in packages:
app_mod = import_module(app)
try:
licence_information = app_mod.LICENCE_INFORMATION
LICENCE_INFORMATION.append(licence_information)
except AttributeError:
pass
......@@ -39,7 +39,7 @@
</div>
</div>
{% for short_name, app in licence_information.items %}
{% for app in licence_information %}
<div class="card">
<div class="card-content">
<span class="card-title">{{ app.name }}</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment