X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..03715cba601c571ac35765daa5b6a97a004326cf:/src/isbn/models.py diff --git a/src/isbn/models.py b/src/isbn/models.py index ca8dbee15..b5e5de3a2 100644 --- a/src/isbn/models.py +++ b/src/isbn/models.py @@ -1,10 +1,8 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.db import models from django.db.models import F -from jsonfield import JSONField class ISBNPool(models.Model): @@ -53,14 +51,14 @@ class ISBNPool(models.Model): class ONIXRecord(models.Model): - isbn_pool = models.ForeignKey(ISBNPool) + isbn_pool = models.ForeignKey(ISBNPool, models.PROTECT) datestamp = models.DateField(auto_now=True) suffix = models.IntegerField() product_form = models.CharField(max_length=4) product_form_detail = models.CharField(max_length=8, blank=True) title = models.CharField(max_length=256) part_number = models.CharField(max_length=64, blank=True) - contributors = JSONField() # roles, names, optional: ISNI, date of birth/death + contributors = models.TextField() # roles, names, optional: ISNI, date of birth/death edition_type = models.CharField(max_length=4) edition_number = models.IntegerField(default=1) language = models.CharField(max_length=4)