added topic_edit.jinja2

This commit is contained in:
2022-05-10 21:29:32 +02:00
parent cd5651ac62
commit 4f5bb3350e
16 changed files with 179 additions and 143 deletions

View File

@@ -20,13 +20,12 @@ class BlogRecord(Base):
id = Column(Integer, primary_key=True)
title = Column(Unicode(255), unique=True, nullable=False)
body = Column(UnicodeText, default='')
author = Column(Unicode(30), default='')
created = Column(DateTime, default=datetime.datetime.now)
edited = Column(DateTime, default=datetime.datetime.now)
topic_id = Column(ForeignKey('topics.topic'), nullable=False)
topic = relationship('Topics', backref='topic_pages')
tag = Column(Unicode(25))
author = Column(Unicode(50), default='')
@property
def slug(self):
@@ -41,6 +40,7 @@ class Topics(Base):
__tablename__ = 'topics'
topic = Column(Unicode(25), primary_key=True)
topic_name = Column(Unicode(25), nullable=False)
topic_quote = Column(Unicode(255), default='')
class Tags(Base):
__tablename__ = 'tags'