mod4b-rundocker/main.py
def store_visit(remote_addr, user_agent):
    'create new Visit entity in Datastore'
    entity = datastore.Entity(key=ds_client.key('Visit'))
    entity.update({
        'timestamp': datetime.now(),
        'visitor': '{}: {}'.format(remote_addr, user_agent),
    })
    ds_client.put(entity)
create new Visit entity in Datastore
create new Visit entity in Datastore
create new Visit entity in Datastore
def store_visit(remote_addr, user_agent):
    entity = datastore.Entity(key=ds_client.key('Visit'))
    entity.update({
        'timestamp': datetime.now(),
        'visitor': '{}: {}'.format(remote_addr, user_agent),
    })
    ds_client.put(entity)
def store_visit ( remote_addr , user_agent ) : entity = datastore . Entity ( key = ds_client . key ( 'Visit' ) ) entity . update ( { 'timestamp' : datetime . now ( ) , 'visitor' : '{}: {}' . format ( remote_addr , user_agent ) , } ) ds_client . put ( entity )
create new Visit entity in Datastore
create new Visit entity in Datastore
'create new Visit entity in Datastore'
remote_addr
user_agent