コード例 #1
0
ファイル: models.py プロジェクト: chrisGoad/imagediver_sv
def loadUserD(topic, pageStore=None):
    rs = "missing"
    if pageStore:
        ubt = pageStore.get('usersByTopic', None)
        if ubt:
            rs = ubt.get(topic, "missing")
    if rs == "missing":
        d = dynamo.getUser(topic)
        vprint("LOADED USER FROM DYNAMO ", d)
        if d == None:
            rs = None
        else:
            rs = UserD(topic)
            rs.__dict__.update(d)
        if pageStore:
            if not ubt:
                ubt = {}
                pageStore['usersByTopic'] = ubt
            ubt[topic] = rs
    if rs:
        rs.pageStore = pageStore
    return rs
コード例 #2
0
ファイル: model.py プロジェクト: chrisGoad/imagediver_sv
dyn.createAlbumTable()
"""
dyn.xferAlbums()


ii =  dyn.getUser('/user/cg')

tab = dyn.imageTable()
q  = tab.scan()

for u in q:
  print "V",u
  
,range_key='Chris Goad')

dynamo.getUser('/user/cg')



import model.models
model = model.models
topic = "/album/cg/The_Ambassadors/1"
album = model.loadAlbumD(topic)

snaps = model.snapsInAlbum(topic)