Changes between Version 6 and Version 7 of S3/S3Tracking


Ignore:
Timestamp:
03/22/11 12:54:39 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Tracking

    v6 v7  
    9292
    9393{{{
    94 record = db(db.my_table.uuid=="9207324b-5dc6-439b-9410-8920cbaf8a34").select(limitby=(0, 1)).first()
     94record = db(db.my_table.uuid == "9207324b-5dc6-439b-9410-8920cbaf8a34").select(limitby=(0, 1)).first()
    9595trackable = s3tracker(record)
    9696}}}
     
    9999
    100100{{{
    101 records = db(db.my_table.id.belongs(1,2,3,4)).select()
     101records = db(db.my_table.id.belongs(1, 2, 3, 4)).select()
    102102trackable = s3tracker(records)
    103103}}}
     
    132132{{{
    133133# Using a location record
    134 location = db(db.gis_location.id==25).select(limitby=(0, 1)).first()
     134location = db(db.gis_location.id == 25).select(limitby=(0, 1)).first()
    135135s3tracker(db.pr_person, 1).set_base_location(location)
    136136
    137137# Using another object containing a location_id
    138 hospital = db(db.hms_hospital.id==3).select(limitby=(0, 1)).first()
     138hospital = db(db.hms_hospital.id == 3).select(limitby=(0, 1)).first()
    139139s3tracker(db.pr_person, 1).set_base_location(hospital)
    140140
     
    150150{{{
    151151from datetime import datetime, timedelta
    152 one_hour_ago = datetime.utcnow()-timedelta(hours=1)
     152one_hour_ago = datetime.utcnow() - timedelta(hours=1)
    153153location = s3tracker(db.pr_person, 1).get_location(timestmp=one_hour_ago)
    154154}}}