Пример #1
0
def _is_post_created(post_id):
    """
    Checks if a post, given its id is created.
    """
    if db.hexists(str(post_id) + APPEND_KEY_POSTS, KEY_TITLE) == 1:
        return True
    else:
        return False
Пример #2
0
def _is_user_created(username):
    """
    Checks if a user, given its id is created.
    """
    if db.hexists(username + APPEND_KEY_USER, KEY_USER) == 1:
        debug(username + " EXISTS")
        return True
    else:
        debug(username + " does NOT EXIST")
        return False