def update_name(self, name): self.name = name self.slug = slugify(name) try: db.session.commit() except: # TODO flash error message db.session.rollback()
def __init__(self, name, bio, picture, website, blog, twitter_id): self.name = name self.bio = bio self.picture = picture self.website = website self.blog = blog self.twitter_id = twitter_id self.slug = slugify(name)
def __init__(self, title, author, publisher, genres, cover_large, cover_thumb, epub_url, stream_url, atom_entry_url): self.title = title self.author = author self.publisher = publisher self.genres = genres self.cover_large = cover_large self.cover_thumb = cover_thumb self.slug = slugify(title) self.last_updated = date.today() self.published = date(2010, 10, 31) self.epub_url = epub_url self.stream_url = stream_url self.atom_entry_url = atom_entry_url
def __init__(self, title, isbn, author, publisher, description, genres, cover_large, cover_thumb, epub_url, stream_url, atom_entry_url): self.title = title self.isbn = isbn self.author = author self.publisher = publisher self.description = description self.genres = genres self.cover_large = cover_large self.cover_thumb = cover_thumb self.slug = slugify(title) self.last_updated = date.today() self.published = date(2010, 10, 31) self.epub_url = epub_url self.stream_url = stream_url self.atom_entry_url = atom_entry_url
def __init__(self, name): self.name = name self.slug = slugify(name)