Add CC BY-SA 4.0 International to media license choices.
authorDavid Thompson <davet@gnu.org>
Mon, 6 Apr 2015 20:00:49 +0000 (16:00 -0400)
committerDavid Thompson <davet@gnu.org>
Mon, 6 Apr 2015 20:00:49 +0000 (16:00 -0400)
mediagoblin_libreplanet/__init__.py

index e2abebb..b4eb7ce 100644 (file)
@@ -23,8 +23,16 @@ from mediagoblin.db.models import MediaEntry
 from mediagoblin.db.util import media_entries_for_tag_slug
 from mediagoblin.tools.pagination import Pagination
 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
+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)
+SUPPORTED_LICENSES[cc_by_sa_4.uri] = cc_by_sa_4
+
 PLUGIN_DIR = os.path.dirname(__file__)
 MAX_HOME_ITEMS = 20
 LP_TAG = 'lp2015'