From 177d4d68bf6d66a22e86721eacd34d8e1efee36a Mon Sep 17 00:00:00 2001 From: danielmyren <daniel.j.myren@gmail.com> Date: Tue, 23 Apr 2024 12:28:41 +0200 Subject: [PATCH] rename files --- .gitignore | 3 ++- backend/app.py | 6 +++--- backend/config.py | 4 +++- backend/{models.py => models_shared.py} | 0 backend/{auth.py => routes_auth.py} | 0 backend/{server.py => routes_default.py} | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) rename backend/{models.py => models_shared.py} (100%) rename backend/{auth.py => routes_auth.py} (100%) rename backend/{server.py => routes_default.py} (91%) mode change 100755 => 100644 diff --git a/.gitignore b/.gitignore index 7debeac..c335a77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.vscode /backend/venv -/backend/__pycache__/ \ No newline at end of file +/backend/__pycache__/ diff --git a/backend/app.py b/backend/app.py index 98f909a..0393af0 100644 --- a/backend/app.py +++ b/backend/app.py @@ -4,7 +4,7 @@ from flask import current_app from flask_sqlalchemy import SQLAlchemy from config import Config from flask_security import Security, SQLAlchemyUserDatastore, auth_required, hash_password -from models import db, User, Role +from models_shared import db, User, Role from flask_security.models import fsqla_v3 as fsqla # Create app @@ -17,10 +17,10 @@ if not app.config['DEBUG']: exit("App is not secure, security configurations for production environment must be made") # Register the blueprints with the app -from server import default as default_blueprint +from routes_default import default as default_blueprint app.register_blueprint(default_blueprint) -from auth import auth as auth_blueprint +from routes_auth import auth as auth_blueprint app.register_blueprint(auth_blueprint) # Setup Flask Security diff --git a/backend/config.py b/backend/config.py index 0874b84..09d7716 100644 --- a/backend/config.py +++ b/backend/config.py @@ -10,4 +10,6 @@ class Config: REMEMBER_COOKIE_SAMESITE = "strict" SESSION_COOKIE_SAMESITE = "strict" # Use an in-memory db - SQLALCHEMY_DATABASE_URI = 'sqlite://' \ No newline at end of file + SQLALCHEMY_DATABASE_URI = 'sqlite://' + SQLALCHEMY_ECHO = True + diff --git a/backend/models.py b/backend/models_shared.py similarity index 100% rename from backend/models.py rename to backend/models_shared.py diff --git a/backend/auth.py b/backend/routes_auth.py similarity index 100% rename from backend/auth.py rename to backend/routes_auth.py diff --git a/backend/server.py b/backend/routes_default.py old mode 100755 new mode 100644 similarity index 91% rename from backend/server.py rename to backend/routes_default.py index 3090dde..0b2e408 --- a/backend/server.py +++ b/backend/routes_default.py @@ -1,4 +1,4 @@ -from models import db, User +from models_shared import db, User from flask import Blueprint, jsonify default = Blueprint("default", __name__) -- GitLab