def unique(uid): """ Checks to see if a post exists. Just in case... """ if R.exists("post:%s" % uid): return False else: return True
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