From: Christopher Allan Webber Date: Sat, 21 Jan 2012 22:51:21 +0000 (-0600) Subject: Provided a SORTED_SUPPORTED_LICENSES (but keep the old unsorted dict!) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d775ebd2f5dc4be1fb8751805465cc99f7cf0f7;p=mediagoblin.git Provided a SORTED_SUPPORTED_LICENSES (but keep the old unsorted dict!) --- diff --git a/mediagoblin/tools/licenses.py b/mediagoblin/tools/licenses.py index cb137fa8..44d8e494 100644 --- a/mediagoblin/tools/licenses.py +++ b/mediagoblin/tools/licenses.py @@ -14,44 +14,37 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -SUPPORTED_LICENSES = { - "": { - "name": "No license specified", - "abbreviation": "All rights reserved" - }, - "http://creativecommons.org/licenses/by/3.0/": { - "name": "Creative Commons Attribution Unported 3.0", - "abbreviation": "CC BY 3.0" - }, - "http://creativecommons.org/licenses/by-sa/3.0": { - "name": "Creative Commons Attribution-ShareAlike Unported 3.0", - "abbreviation": "CC BY-SA 3.0" - }, - "http://creativecommons.org/licenses/by-nd/3.0": { - "name": "Creative Commons Attribution-NoDerivs 3.0 Unported", - "abbreviation": "CC BY-ND 3.0" - }, - "http://creativecommons.org/licenses/by-nc/3.0": { - "name": "Creative Commons Attribution-NonCommercial Unported 3.0", - "abbreviation": "CC BY-NC 3.0" - }, - "http://creativecommons.org/licenses/by-nc-sa/3.0": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported", - "abbreviation": "CC BY-NC-SA 3.0" - }, - "http://creativecommons.org/licenses/by-nc-nd/3.0": { - "name": "Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported", - "abbreviation": "CC BY-NC-ND 3.0" - }, - "http://creativecommons.org/publicdomain/zero/1.0/": { - "name": "Creative Commons CC0 1.0 Universal", - "abbreviation": "CC0 1.0" - }, - "http://creativecommons.org/publicdomain/mark/1.0/": { - "name": "Public Domain", - "abbreviation": "Public Domain" - }, -} +SORTED_SUPPORTED_LICENSES = [ + ("", + {"name": "No license specified", + "abbreviation": "All rights reserved"}), + ("http://creativecommons.org/licenses/by/3.0/", + {"name": "Creative Commons Attribution Unported 3.0", + "abbreviation": "CC BY 3.0"}), + ("http://creativecommons.org/licenses/by-sa/3.0", + {"name": "Creative Commons Attribution-ShareAlike Unported 3.0", + "abbreviation": "CC BY-SA 3.0"}), + ("http://creativecommons.org/licenses/by-nd/3.0", + {"name": "Creative Commons Attribution-NoDerivs 3.0 Unported", + "abbreviation": "CC BY-ND 3.0"}), + ("http://creativecommons.org/licenses/by-nc/3.0", + {"name": "Creative Commons Attribution-NonCommercial Unported 3.0", + "abbreviation": "CC BY-NC 3.0"}), + ("http://creativecommons.org/licenses/by-nc-sa/3.0", + {"name": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported", + "abbreviation": "CC BY-NC-SA 3.0"}), + ("http://creativecommons.org/licenses/by-nc-nd/3.0", + {"name": "Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported", + "abbreviation": "CC BY-NC-ND 3.0"}), + ("http://creativecommons.org/publicdomain/zero/1.0/", + {"name": "Creative Commons CC0 1.0 Universal", + "abbreviation": "CC0 1.0"}), + ("http://creativecommons.org/publicdomain/mark/1.0/", + {"name": "Public Domain", + "abbreviation": "Public Domain"})] + +SUPPORTED_LICENSES = dict(SORTED_SUPPORTED_LICENSES) + def licenses_as_choices(): license_list = []