Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

src/s/n/sneakernet-HEAD/appengine/cachetalk.py   sneakernet(Download)
  def get(self):
    from cache import can_operate_on, ContentCopy, get_cache_by_name, Cache, TYPE_COMPUTER
    from user_sn import confirm
    u = confirm(self)
    cname = self.request.get("cache")
        c = Cache(friendlyName = cname,type=TYPE_COMPUTER,last_touched=u,space_left=-1,person_responsible=u)
        c.put()
    if not can_operate_on(c,u):
        raise Exception("You're not permitted to sync this cache.")
    #fetch everything that's "supposed" to be on the key
  def post(self):
    from user_sn import confirm
    from cache import can_operate_on, get_copy, ContentCopy, get_cache_by_name, TYPE_COMPUTER, TYPE_EXTERN_FD, TYPE_LOCAL_FD, TYPE_EXTERNAL_RING
    from Content import content_by_id
    u = confirm(self)
    cname = self.request.get("cache")
    c = get_cache_by_name(cname)
    if not can_operate_on(c,u):

src/s/n/sneakernet-HEAD/appengine/purge.py   sneakernet(Download)
  def get(self):
    from user_sn import confirm
    u = confirm(self)
    from cache import get_cache_by_name, can_operate_on, ContentCopy
    from Content import content_by_id
 
    c = get_cache_by_name(self.request.get("cache"))
    if not can_operate_on(c,u):