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

Bruker fileformat.write_action i Book.to_string.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-03-05 18:10:10 +00:00
parent ae8dd0ba02
commit add8e4fd65
1 changed files with 2 additions and 0 deletions

View File

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