fikset litt på book.full_print()
This commit is contained in:
parent
46524f32cd
commit
a078b99525
|
@ -1,6 +1,6 @@
|
||||||
from django.db import models
|
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',
|
'subtitle' : 'Subtitle', 'category' : 'Category', 'publisher':'Publisher',
|
||||||
'published_year':'Published year', 'edition' : 'Edition', 'num_pages' : 'Number of pages',
|
'published_year':'Published year', 'edition' : 'Edition', 'num_pages' : 'Number of pages',
|
||||||
'series' : 'Series', 'description' : 'Description'}
|
'series' : 'Series', 'description' : 'Description'}
|
||||||
|
@ -42,6 +42,8 @@ class Book(models.Model):
|
||||||
print '%-15s: %50s' % (field[1],eval('self.'+field[0]))
|
print '%-15s: %50s' % (field[1],eval('self.'+field[0]))
|
||||||
except Category.DoesNotExist:
|
except Category.DoesNotExist:
|
||||||
print '%-15s: %50s' % (field[1], 'Does not exist')
|
print '%-15s: %50s' % (field[1], 'Does not exist')
|
||||||
|
except Id.DoesNotExist:
|
||||||
|
print '%-15s: %50s' % (field[1], '')
|
||||||
|
|
||||||
def getid(self):
|
def getid(self):
|
||||||
try:
|
try:
|
||||||
|
|
Reference in New Issue