Projects/worblehat-old
Projects
/
worblehat-old
Archived
12
0
Fork 0

litt mer fiksedilling på models.py

This commit is contained in:
Øyvind Almelid 2010-09-28 13:28:48 +00:00
parent a078b99525
commit f4c9116ad8
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Book(models.Model):
published_year = models.IntegerField(null=True, blank=True) published_year = models.IntegerField(null=True, blank=True)
edition = models.IntegerField(null=True, blank=True) edition = models.IntegerField(null=True, blank=True)
num_pages = 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) description = models.CharField(max_length=1023, null=True, blank=True)
picture = models.ImageField(upload_to='%Y/%m/%d/pictures', 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) 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) alt_title = models.CharField(max_length=511)
class Copy(models.Model): class Copy(models.Model):
book = models.ForeignKey(Book) book = models.ForeignKey(Book, related_name='copies')
number = models.IntegerField() number = models.IntegerField()
owner = models.CharField(max_length=9) owner = models.CharField(max_length=9)