class Contact(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String()) sub_title = db.Column(db.Text()) body = db.Column(db.Text()) edited = db.Column(db.DateTime, index=True, default=datetime.utcnow) def __repr__(self): return self.title
class Post(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(100), nullable=False) intro = db.Column(db.String(200)) body = db.Column(db.Text(), nullable=False) timestamp = db.Column(db.DateTime, index=True, default=datetime.utcnow) user_name = db.Column(db.Integer, db.ForeignKey('user.username')) user = db.relationship("User", back_populates="posts") @property def slugified_title(self): return slugify(self.title) def __repr__(self): return 'Post {}'.format(self.title)
class About(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String()) title_description = db.Column(db.Text()) red_intro = db.Column(db.String()) black_intro = db.Column(db.String()) intro_description = db.Column(db.Text()) first_offer = db.Column(db.String()) first_offer_description = db.Column(db.Text()) second_offer = db.Column(db.String()) second_offer_description = db.Column(db.Text()) third_offer = db.Column(db.String()) third_offer_description = db.Column(db.Text()) first_step = db.Column(db.String()) first_step_description = db.Column(db.Text()) second_step = db.Column(db.String()) second_step_description = db.Column(db.Text()) third_step = db.Column(db.String()) third_step_description = db.Column(db.Text()) edited = db.Column(db.DateTime, index=True, default=datetime.utcnow) def __repr__(self): return self.title
class Home(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String()) title_description = db.Column(db.Text()) about_intro = db.Column(db.String()) about_description = db.Column(db.Text()) first_card_title = db.Column(db.String()) first_card_description = db.Column(db.Text()) second_card_title = db.Column(db.String()) second_card_description = db.Column(db.Text()) third_card_title = db.Column(db.String()) third_card_description = db.Column(db.Text()) blog_intro = db.Column(db.String()) blog_title = db.Column(db.Text()) edited = db.Column(db.DateTime, index=True, default=datetime.utcnow) def __repr__(self): return self.title