diff --git a/mediagoblin_libreplanet/__init__.py b/mediagoblin_libreplanet/__init__.py index 1914caa..2a0de2c 100644 --- a/mediagoblin_libreplanet/__init__.py +++ b/mediagoblin_libreplanet/__init__.py @@ -26,12 +26,22 @@ from mediagoblin.tools.response import render_to_response from mediagoblin.tools.licenses import SORTED_LICENSES, SUPPORTED_LICENSES, License from mediagoblin.decorators import uses_pagination, user_not_banned -# Add CC BY-SA 4.0 to licenses +# Add three CC BY non-NC 4.0 to licenses +cc_by_4 = License("CC BY 4.0", + "Creative Commons Attribution 4.0 International", + "https://creativecommons.org/licenses/by/4.0/") cc_by_sa_4 = License("CC BY-SA 4.0", "Creative Commons Attribution-ShareAlike 4.0 International", "https://creativecommons.org/licenses/by-sa/4.0/") -SORTED_LICENSES.insert(1, cc_by_sa_4) +cc_by_nd_4 = License("CC BY-ND 4.0", + "Creative Commons Attribution-NoDerivatives 4.0 International", + "https://creativecommons.org/licenses/by-nd/4.0/") +SORTED_LICENSES.insert(1, cc_by_4) +SORTED_LICENSES.insert(2, cc_by_sa_4) +SORTED_LICENSES.insert(3, cc_by_nd_4) +SUPPORTED_LICENSES[cc_by_4.uri] = cc_by_4 SUPPORTED_LICENSES[cc_by_sa_4.uri] = cc_by_sa_4 +SUPPORTED_LICENSES[cc_by_nd_4.uri] = cc_by_nd_4 PLUGIN_DIR = os.path.dirname(__file__)