Exemple #1
0
def get_user_prompts(user):
    query = UserPrompt.select().where(
        UserPrompt.user == user).join(UserPromptKind)
    return [prompt.kind.name for prompt in query]
Exemple #2
0
def has_user_prompts(user):
    try:
        UserPrompt.select().where(UserPrompt.user == user).get()
        return True
    except UserPrompt.DoesNotExist:
        return False