litt mer fiksedilling på models.py
This commit is contained in:
parent
a078b99525
commit
f4c9116ad8
|
@ -30,7 +30,7 @@ class Book(models.Model):
|
|||
published_year = models.IntegerField(null=True, blank=True)
|
||||
edition = models.IntegerField(null=True, blank=True)
|
||||
num_pages = models.IntegerField(null=True, blank=True)
|
||||
series = models.ForeignKey(BookSeries, null=True, blank=True)
|
||||
series = models.ForeignKey(BookSeries, related_name='books', null=True, blank=True)
|
||||
description = models.CharField(max_length=1023, null=True, blank=True)
|
||||
picture = models.ImageField(upload_to='%Y/%m/%d/pictures', null=True, blank=True)
|
||||
thumbnail = models.ImageField(upload_to='%Y/%m/%d/thumbnails', null=True, blank=True)
|
||||
|
@ -89,7 +89,7 @@ class AlternativeTitle(models.Model):
|
|||
alt_title = models.CharField(max_length=511)
|
||||
|
||||
class Copy(models.Model):
|
||||
book = models.ForeignKey(Book)
|
||||
book = models.ForeignKey(Book, related_name='copies')
|
||||
number = models.IntegerField()
|
||||
owner = models.CharField(max_length=9)
|
||||
|
||||
|
|
Reference in New Issue