comparison backend/couchdb/FeedEntry.py @ 171:27be2a5f9c10

use the new ListDateTimeField in FeedEntries to store their creation date
author dirk
date Fri, 09 Sep 2011 16:34:02 +0200
parents 91a24f499318
children d0ced79b5030
comparison
equal deleted inserted replaced
170:f0afcd1c5656 171:27be2a5f9c10
1 1
2 from backend.couchdb.ListDateTimeField import ListDateTimeField
2 from couchdb.mapping import BooleanField, DateTimeField, Document, TextField 3 from couchdb.mapping import BooleanField, DateTimeField, Document, TextField
3 from datetime import datetime 4 from datetime import datetime
4 import CouchDb 5 import CouchDb
5 6
6 class FeedEntry(Document): 7 class FeedEntry(Document):
7 doctype = TextField(default="feedEntry") 8 doctype = TextField(default="feedEntry")
8 create_timestamp = DateTimeField(default=datetime.now()) 9 create_timestamp = ListDateTimeField(default=datetime.now())
9 read = BooleanField(default=False) 10 read = BooleanField(default=False)
10 link = TextField() 11 link = TextField()
11 title = TextField() 12 title = TextField()
12 summary = TextField() 13 summary = TextField()
13 updated = DateTimeField() 14 updated = DateTimeField()