Download presentation
Presentation is loading. Please wait.
Published byMolly Thorpe Modified over 11 years ago
1
(Very) Simple Group Calendar Calendar which can display a whole month, or a single day, with events Can create new appointments with rendezvous information Can invite people to an appointment
2
Group Calendar Objects Calendar – holds appointments keyed by subject and date (sorted) Person – name, core hours ; later updated to just username, realname Appointment – holds date, duration, subject, location, list of participants (driver script)
3
Required imports import ZODB from ZODB.DB import DB from ZODB.FileStorage import FileStorage from Persistence import Persistent from BTrees.OOBTrees import OOBTrees
4
Creating persistent classes from Persistence import Persistent class Person(Persistent): # …
5
Application boilerplate fs = FileStorage(cal.fs) db = DB(fs) conn = DB.open() root = conn.root() if not root.has_key(collectionName): root[collectionName] = OOBTree()
6
Using transactions calendar = root[calendar] calendar.add_appointment(app) get_transaction().commit() # …or… get_transaction().abort()
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.