mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-12-22 04:52:49 -08:00
add CC BY 4.0 license
This commit is contained in:
parent
f00b2df592
commit
bcb541ba85
@ -5,7 +5,8 @@ LICENSE_CHOICES = [
|
||||
(4, 'CC BY-SA 3.0'),
|
||||
(5, 'CC BY 3.0'),
|
||||
(6, 'CC BY 1.0'),
|
||||
(7, 'CC0 1.0')
|
||||
(7, 'CC0 1.0'),
|
||||
(8, 'CC BY 4.0'),
|
||||
]
|
||||
|
||||
|
||||
@ -24,3 +25,5 @@ def get_license_info(x):
|
||||
return ('CC BY 1.0', 'https://creativecommons.org/licenses/by/1.0')
|
||||
if x == 7:
|
||||
return ('CC0 1.0', 'https://creativecommons.org/publicdomain/zero/1.0')
|
||||
if x == 8:
|
||||
return ('CC BY 4.0', 'https://creativecommons.org/licenses/by/4.0')
|
||||
|
28
audio/migrations/0024_auto_20211107_0710.py
Normal file
28
audio/migrations/0024_auto_20211107_0710.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.9 on 2021-11-07 15:10
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('audio', '0023_auto_20210403_0102'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='episode',
|
||||
name='image_license',
|
||||
field=models.SmallIntegerField(choices=[(1, 'Public Domain'), (2, 'Unknown'), (3, 'CC BY-SA 2.5'), (4, 'CC BY-SA 3.0'), (5, 'CC BY 3.0'), (6, 'CC BY 1.0'), (7, 'CC0 1.0'), (8, 'CC BY 4.0')], default=2),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='feed',
|
||||
name='image_license',
|
||||
field=models.SmallIntegerField(choices=[(1, 'Public Domain'), (2, 'Unknown'), (3, 'CC BY-SA 2.5'), (4, 'CC BY-SA 3.0'), (5, 'CC BY 3.0'), (6, 'CC BY 1.0'), (7, 'CC0 1.0'), (8, 'CC BY 4.0')], default=2),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='feed',
|
||||
name='license',
|
||||
field=models.SmallIntegerField(choices=[(1, 'Public Domain'), (2, 'Unknown'), (3, 'CC BY-SA 2.5'), (4, 'CC BY-SA 3.0'), (5, 'CC BY 3.0'), (6, 'CC BY 1.0'), (7, 'CC0 1.0'), (8, 'CC BY 4.0')], default=1),
|
||||
),
|
||||
]
|
@ -18,14 +18,15 @@ TEST_LICENSE_INFO = (
|
||||
('CC BY-SA 3.0', 'https://creativecommons.org/licenses/by-sa/3.0'),
|
||||
('CC BY 3.0', 'https://creativecommons.org/licenses/by/3.0'),
|
||||
('CC BY 1.0', 'https://creativecommons.org/licenses/by/1.0'),
|
||||
('CC0 1.0', 'https://creativecommons.org/publicdomain/zero/1.0')
|
||||
('CC0 1.0', 'https://creativecommons.org/publicdomain/zero/1.0'),
|
||||
('CC BY 4.0', 'https://creativecommons.org/licenses/by/4.0')
|
||||
)
|
||||
|
||||
|
||||
class LicenseChoicesTestCase(SimpleTestCase):
|
||||
|
||||
def test_license_choices(self):
|
||||
self.assertEqual(len(LICENSE_CHOICES), 7)
|
||||
self.assertEqual(len(LICENSE_CHOICES), 8)
|
||||
for i, x in enumerate(TEST_LICENSE_CHOICES):
|
||||
self.assertEqual(TEST_LICENSE_CHOICES[i], LICENSE_CHOICES[i])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user