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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def enableAutoRefresh(jar, productid, enable):
    productid = str(productid)
    rd = _getCentralRefreshData(jar, 1)
    ids = rd.get('auto', None)
    if ids is None:
        if enable:
            rd['auto'] = ids = PersistentMapping()
    if enable:
        ids[productid] = 1
        if ids.has_key(productid):
            del ids[productid]

src/z/o/Zope2-2.13.22/src/App/Product.py   Zope2(Download)
    def manage_enableAutoRefresh(self, enable=0, REQUEST=None):
        """ Changes the auto refresh flag for this product.
        from App.RefreshFuncs import enableAutoRefresh
        if self._readRefreshTxt() is None:
            raise Unauthorized, 'refresh.txt not created'
        enableAutoRefresh(self._p_jar, self.id, enable)