def philosophy_phrase(): """ If there is no any published phrases in db, it would return the empty strings in variables, else it would return a text of the phrase and author of the phrase. :param context: :return: """ phrase = get_random_phrase() if not phrase: phrase = {'author': '', 'phrase': ''} return phrase
def __init__(self): self.phrase = get_random_phrase(True)