Add notes

This commit is contained in:
RemiZOffAlex
2020-02-16 22:58:39 +03:00
parent c4f4295dcc
commit 0c190878c3
12 changed files with 818 additions and 1 deletions

View File

@@ -11,7 +11,10 @@ from sqlalchemy_utils import database_exists, create_database
from .. import app
engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI'], echo=True)
engine = create_engine(
app.config['SQLALCHEMY_DATABASE_URI'],
echo=app.config['SQLDEBUG']
)
if not database_exists(engine.url):
create_database(engine.url)
@@ -30,6 +33,9 @@ from .tag import Tag
# Статьи
from .page import Page, TagPage
# Заметки
from .note import Note, TagNote
Base.metadata.create_all(engine)
__all__ = []