diff --git a/.gitignore b/.gitignore index a89ad7f..61d3ec8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ $* *.db venv/ __pycache__/ -.vscode/ \ No newline at end of file +.vscode/ +file_storage/ \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py index e45354b..469ce61 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -13,8 +13,10 @@ def create_app(test_config=None): DATABASE_USER='root', DATABASE_HOST='localhost', DATABASE_PASS='lil0,.lil0', + UPLOADDIR=os.path.join("./file_storage"), ) - + if not os.path.exists(app.config['UPLOADDIR']): + os.mkdir(app.config['UPLOADDIR']) if test_config is None: app.config.from_pyfile('config.py', silent=True) else: diff --git a/src/templates/user/book.html b/src/templates/user/book.html index 0cd3564..1f20b9b 100644 --- a/src/templates/user/book.html +++ b/src/templates/user/book.html @@ -1,102 +1,123 @@ {% extends 'base.html' %} {% block header %} - + {% endblock %} {% block content %} -