def GET(self):
        """
        """
        page = int(self.env["members"]["p"]) \
                if self.env["members"].has_key("p") else 1
        view = adminDevViewBucketsTmpl(searchList=[self.tmplSearchList])

        view.scripts = ["jquery.json-2.4.min",
                "devBucketsButtons.flagr"]
        pail = bm.bucketPail("bucket:*:value")
        pail.paginate(page, 25)
        pail.fetch()
        pail.sortBy("id")
        view.buckets = pail

        return view
Beispiel #2
0
def addBuckets():
    buckets = update.buckets
    for bucket in buckets:
        print "Adding Bucket:"
        print "    "  + bucket
        print "    " + str(buckets[bucket])
        newBucket = brm.redisObject("bucket:" + bucket)

        newBucket["name"] = buckets[bucket]["name"]
        newBucket["value"] = buckets[bucket]["value"]
        newBucket["description"] = buckets[bucket]["description"]

        if buckets[bucket].has_key("users"):
            newBucket["users"] = buckets[bucket]["users"]

    pail = bm.bucketPail("bucket:*:value")
    pail.update()
Beispiel #3
0
def bucketSetup():
    print "Now setting up buckets..."
    buckets = config.buckets
    for bucket in buckets:
        print "Adding Bucket:"
        print "    "  + bucket
        print "    " + str(buckets[bucket])
        newBucket = brm.redisObject("bucket:" + bucket)

        newBucket["name"] = buckets[bucket]["name"]
        newBucket["value"] = buckets[bucket]["value"]
        newBucket["description"] = buckets[bucket]["description"]

        if buckets[bucket].has_key("users"):
            newBucket["users"] = buckets[bucket]["users"]

    pail = bm.bucketPail("bucket:*:value")
    pail.update()