def send(self, phone=None): phone = phone or Phone.query.get(self.phone_id) body = self.get_body() if send_by_twilio(phone.phone_string, body): self.sent_time = utility.get_time() db.session.commit() return True return False
def __init__(self, selection): self.selection = selection self.creation_time = utility.get_time()
def __init__(self, phone_string): self.phone_string = phone_string self.creation_time = utility.get_time() self.deleted = False self.sent_intro = False
def __init__(self, title, text): self.title = title self.text = text self.creation_time = utility.get_time() self.route = utility.dashify(title)
def __init__(self, name): self.name = name self.route = utility.dashify(name) self.creation_time = utility.get_time()
def __init__(self, poem_audio_count, ext, filename): self.ext = ext self.filename = get_next_audio(filename, poem_audio_count) self.creation_time = utility.get_time() self.youtube = None