From f4c9116ad84a4bd949b65bcc6be26704cffb53df Mon Sep 17 00:00:00 2001
From: almelid <almelid@pvv.ntnu.no>
Date: Tue, 28 Sep 2010 13:28:48 +0000
Subject: [PATCH] =?UTF-8?q?litt=20mer=20fiksedilling=20p=C3=A5=20models.py?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 python/web/library/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/web/library/models.py b/python/web/library/models.py
index 8752a4e..1b50871 100644
--- a/python/web/library/models.py
+++ b/python/web/library/models.py
@@ -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)