extensions-website/constants/licenses.py
Dalai Felinto 02a7e407a5 Use SPDX for the licenses
We still do not check if the license on the extension is also
SPDX compatible, and one of the accepted by the server.
2024-02-01 10:10:01 +01:00

27 lines
549 B
Python

"""Lists licenses allowed for add-ons.
Slugs should be taken from https://spdx.org/licenses/
"""
from django.utils.translation import gettext_lazy as _
class LICENSE_GPL2:
id = 2
name = _('GNU General Public License v2.0')
url = 'http://www.gnu.org/licenses/gpl-2.0.html'
slug = 'SPDX:GPL-2.0-or-later'
class LICENSE_GPL3:
id = 3
name = _('GNU General Public License v3.0')
url = 'http://www.gnu.org/licenses/gpl-3.0.html'
slug = 'SPDX:GPL-3.0-or-later'
ALL_LICENSES = (
LICENSE_GPL2,
LICENSE_GPL3,
)