fikset litt på book.full_print()
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user