diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-26 18:39:41 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:43:58 +0200 |
commit | 4fa0e9a22f25231f18d2beeb25438c0e9637e46e (patch) | |
tree | e30079fda3f83c4ddf1d81f4668b81d4f1d51414 /ishtar_common | |
parent | 6ae2b1824471f53269b5ccaac76db5fc73f16543 (diff) | |
download | Ishtar-4fa0e9a22f25231f18d2beeb25438c0e9637e46e.tar.bz2 Ishtar-4fa0e9a22f25231f18d2beeb25438c0e9637e46e.zip |
Add URL to licence types. Add missing model to admin.
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/admin.py | 3 | ||||
-rw-r--r-- | ishtar_common/migrations/0050_licensetype_url.py | 20 | ||||
-rw-r--r-- | ishtar_common/models.py | 1 |
3 files changed, 23 insertions, 1 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index edaf925db..297da941e 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -454,7 +454,8 @@ class GeneralTypeAdmin(admin.ModelAdmin): general_models = [models.OrganizationType, models.SourceType, models.AuthorType, models.TitleType, models.Format, - models.SupportType, models.PersonType] + models.SupportType, models.PersonType, models.LicenseType, + models.ImageType] for model in general_models: admin_site.register(model, GeneralTypeAdmin) diff --git a/ishtar_common/migrations/0050_licensetype_url.py b/ishtar_common/migrations/0050_licensetype_url.py new file mode 100644 index 000000000..d1ef99cf7 --- /dev/null +++ b/ishtar_common/migrations/0050_licensetype_url.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-04-26 17:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0049_auto_20180423_1857'), + ] + + operations = [ + migrations.AddField( + model_name='licensetype', + name='url', + field=models.URLField(blank=True, null=True, verbose_name='URL'), + ), + ] diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 3a0bb853f..35be3ffc0 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3026,6 +3026,7 @@ class Source(OwnPerms, ImageModel, FullSearch): class LicenseType(GeneralType): + url = models.URLField(_(u"URL"), blank=True, null=True) class Meta: verbose_name = _(u"License type") verbose_name_plural = _(u"License types") |