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

fikset litt på book.full_print()

This commit is contained in:
Øyvind Almelid 2010-09-28 13:28:15 +00:00
parent 46524f32cd
commit a078b99525
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
from django.db import models
book_fields = {'isbn' : 'ISBN', 'id' : 'Identifier', 'title' : 'Title',
book_fields = {'isbn' : 'ISBN', 'id.id' : 'Identifier', 'title' : 'Title',
'subtitle' : 'Subtitle', 'category' : 'Category', 'publisher':'Publisher',
'published_year':'Published year', 'edition' : 'Edition', 'num_pages' : 'Number of pages',
'series' : 'Series', 'description' : 'Description'}
@ -42,6 +42,8 @@ class Book(models.Model):
print '%-15s: %50s' % (field[1],eval('self.'+field[0]))
except Category.DoesNotExist:
print '%-15s: %50s' % (field[1], 'Does not exist')
except Id.DoesNotExist:
print '%-15s: %50s' % (field[1], '')
def getid(self):
try: