added other CC 4.0 licenses
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 27 Mar 2017 21:18:14 +0000 (17:18 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 27 Mar 2017 21:18:14 +0000 (17:18 -0400)
mediagoblin_libreplanet/__init__.py

index 1914caa406a8d4370427c42c62a7eecc79ef33f7..2a0de2c7b15e9432e6696ddbe50802310650a94e 100644 (file)
@@ -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__)