husseinelsaadi commited on
Commit
68d1258
·
1 Parent(s): 4d8c345
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -28,11 +28,12 @@ from backend.models.resume_parser.resume_to_features import extract_resume_featu
28
  # Initialize Flask app
29
  app = Flask(
30
  __name__,
31
- static_folder='backend/static', # this is the actual folder on disk
32
- static_url_path='/static', # this is the URL route, must start with `/`
33
- template_folder='backend/templates'
 
34
  )
35
- app.instance_path = os.path.join(os.getcwd(), 'instance')
36
  app.config['SECRET_KEY'] = 'your-secret-key'
37
  #
38
  # Configure the database connection
@@ -52,7 +53,7 @@ app.config['SECRET_KEY'] = 'your-secret-key'
52
  # SQLite URI (e.g. `sqlite:///relative/path.db`). Here we use four
53
  # leading slashes because the path is relative to the project
54
  # directory when using `sqlite:///backend/instance/codingo.db`.
55
- app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///./codingo.db'
56
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
57
  from flask_wtf.csrf import CSRFProtect
58
 
@@ -61,7 +62,6 @@ from flask_wtf.csrf import CSRFProtect
61
  # Create necessary directories
62
  os.makedirs('static/audio', exist_ok=True)
63
  os.makedirs('temp', exist_ok=True)
64
- os.makedirs('backend/instance', exist_ok=True)
65
 
66
  # Initialize DB with app
67
  init_db(app)
 
28
  # Initialize Flask app
29
  app = Flask(
30
  __name__,
31
+ static_folder='backend/static',
32
+ static_url_path='/static',
33
+ template_folder='backend/templates',
34
+ instance_path=os.path.join(os.getcwd(), 'instance') # ✅ fix goes here
35
  )
36
+
37
  app.config['SECRET_KEY'] = 'your-secret-key'
38
  #
39
  # Configure the database connection
 
53
  # SQLite URI (e.g. `sqlite:///relative/path.db`). Here we use four
54
  # leading slashes because the path is relative to the project
55
  # directory when using `sqlite:///backend/instance/codingo.db`.
56
+ app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///codingo.db'
57
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
58
  from flask_wtf.csrf import CSRFProtect
59
 
 
62
  # Create necessary directories
63
  os.makedirs('static/audio', exist_ok=True)
64
  os.makedirs('temp', exist_ok=True)
 
65
 
66
  # Initialize DB with app
67
  init_db(app)