X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d6f190d50127a1aca615ff505a8a2595b4cfb7de..75957f735219259d3b4bc361f80ccd3d7b92a0e9:/src/isbn/models.py diff --git a/src/isbn/models.py b/src/isbn/models.py index a4fa28a4a..d65ca606c 100644 --- a/src/isbn/models.py +++ b/src/isbn/models.py @@ -1,4 +1,3 @@ -# -*- 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. # @@ -22,7 +21,7 @@ class ISBNPool(models.Model): next_suffix = models.IntegerField() purpose = models.CharField(max_length=4, choices=PURPOSE_CHOICES) - def __unicode__(self): + def __str__(self): return self.prefix @classmethod @@ -53,7 +52,7 @@ 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)