Ejemplo n.º 1
0
def unique(uid):
    """
    Checks to see if a post exists. Just in case...
    """
    if R.exists("post:%s" % uid):
        return False
    else:
        return True
Ejemplo n.º 2
0
 def checksite():
     if R.exists(POSTINCR):
         print "Redis up and ready to go. \
                 Site implemented with incr: %i" % R.get(POSTINCR)
         return True
     else:
         R.incr(POSTINCR)
         print "Initialized to: %i" % R.get(POSTINCR)
         return True