Changes between Version 6 and Version 7 of S3/S3Tracking
- Timestamp:
- 03/22/11 12:54:39 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Tracking
v6 v7 92 92 93 93 {{{ 94 record = db(db.my_table.uuid =="9207324b-5dc6-439b-9410-8920cbaf8a34").select(limitby=(0, 1)).first()94 record = db(db.my_table.uuid == "9207324b-5dc6-439b-9410-8920cbaf8a34").select(limitby=(0, 1)).first() 95 95 trackable = s3tracker(record) 96 96 }}} … … 99 99 100 100 {{{ 101 records = db(db.my_table.id.belongs(1, 2,3,4)).select()101 records = db(db.my_table.id.belongs(1, 2, 3, 4)).select() 102 102 trackable = s3tracker(records) 103 103 }}} … … 132 132 {{{ 133 133 # Using a location record 134 location = db(db.gis_location.id ==25).select(limitby=(0, 1)).first()134 location = db(db.gis_location.id == 25).select(limitby=(0, 1)).first() 135 135 s3tracker(db.pr_person, 1).set_base_location(location) 136 136 137 137 # Using another object containing a location_id 138 hospital = db(db.hms_hospital.id ==3).select(limitby=(0, 1)).first()138 hospital = db(db.hms_hospital.id == 3).select(limitby=(0, 1)).first() 139 139 s3tracker(db.pr_person, 1).set_base_location(hospital) 140 140 … … 150 150 {{{ 151 151 from datetime import datetime, timedelta 152 one_hour_ago = datetime.utcnow() -timedelta(hours=1)152 one_hour_ago = datetime.utcnow() - timedelta(hours=1) 153 153 location = s3tracker(db.pr_person, 1).get_location(timestmp=one_hour_ago) 154 154 }}}