Bruker fileformat.write_action i Book.to_string.
This commit is contained in:
parent
ae8dd0ba02
commit
add8e4fd65
|
@ -1,4 +1,5 @@
|
|||
from django.db import models
|
||||
import fileformat
|
||||
|
||||
book_fields = [('title' , 'Title'), ('isbn' , 'ISBN'), ('id.id' , 'Identifier'),
|
||||
('subtitle' , 'Subtitle'), ('category' , 'Category'), ('publisher' , 'Publisher'),
|
||||
|
@ -50,6 +51,7 @@ class Book(models.Model):
|
|||
if commit:
|
||||
# generate commit string by sending self.to_dict to oysteini function
|
||||
print self.to_dict()
|
||||
print fileformat.write_action(self.to_dict())
|
||||
|
||||
else:
|
||||
for field in book_fields:
|
||||
|
|
Reference in New Issue