Esempio n. 1
0
def take_ownership(object):
    object.owner = users.get_current_user()

    object.put()

    if isinstance(object, Request):
        query.bust_request_caches()
        object.push.bust_requests_cache()
    elif isinstance(object, Push):
        query.bust_push_caches()
    
    return object
Esempio n. 2
0
 def put(self):
     try:
         return super(Push, self).put()
     finally:
         query.bust_push_caches()