~cheers/cheers/dev

« back to all changes in this revision

Viewing changes to cheers/datastore.py

  • Committer: Seif Lotfy
  • Date: 2010-11-05 15:21:41 UTC
  • Revision ID: seif@lotfy.com-20101105152141-3b1gms53lnfygpor
added sample toprhies and sets
added registration of sets into logic and datastore
added datamodel file

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        self.database = CouchDatabase("cheers", create=True)
40
40
    
41
41
    def register_trophy(self, trophy):
42
 
        trophy_record = CouchRecord(trophy, "http://cheers-project.com")
 
42
        trophy_record = CouchRecord(trophy, "http://cheers-project.com/records/Trophy")
43
43
        self.database.put_record(trophy_record)
 
44
        
 
45
    def register_trophy_set(self, trophy_set):
 
46
        trophy_set_record = CouchRecord(trophy_set, "http://cheers-project.com/records/TrophySet")
 
47
        self.database.put_record(trophy_set_record)
 
48
        
44
49