Exemplo n.º 1
0
 def update_name(self, name):
     self.name = name
     self.slug = slugify(name)
     try:
         db.session.commit()
     except:
         # TODO flash error message
         db.session.rollback()
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
    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
Exemplo n.º 5
0
 def __init__(self, name):
     self.name = name
     self.slug = slugify(name)
Exemplo n.º 6
0
 def __init__(self, name):
     self.name = name
     self.slug = slugify(name)