Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
293d001a
Commit
293d001a
authored
Oct 08, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Flask app initialization to determine project root before creating app
parent
c2d090ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
web.py
vidai/web.py
+6
-2
No files found.
vidai/web.py
View file @
293d001a
...
@@ -35,12 +35,16 @@ from .admin import admin_bp
...
@@ -35,12 +35,16 @@ from .admin import admin_bp
from
.utils
import
get_current_user_session
,
login_required
,
admin_required
from
.utils
import
get_current_user_session
,
login_required
,
admin_required
# Determine project root (parent of vidai directory)
# Determine project root (parent of vidai directory)
project_root
=
os
.
path
.
dirname
(
app
.
root_path
)
current_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
project_root
=
os
.
path
.
dirname
(
current_dir
)
app
=
Flask
(
__name__
,
app
=
Flask
(
__name__
,
template_folder
=
os
.
path
.
join
(
project_root
,
'templates'
),
template_folder
=
os
.
path
.
join
(
project_root
,
'templates'
),
static_folder
=
os
.
path
.
join
(
project_root
,
'static'
))
static_folder
=
os
.
path
.
join
(
project_root
,
'static'
))
app
.
secret_key
=
os
.
environ
.
get
(
'FLASK_SECRET_KEY'
,
'dev-secret-key-change-in-production'
)
app
.
secret_key
=
os
.
environ
.
get
(
'FLASK_SECRET_KEY'
,
'dev-secret-key-change-in-production'
)
os
.
makedirs
(
'../static'
,
exist_ok
=
True
)
# Ensure static directory exists
os
.
makedirs
(
os
.
path
.
join
(
project_root
,
'static'
),
exist_ok
=
True
)
# Ensure avatars directory exists
# Ensure avatars directory exists
avatars_dir
=
os
.
path
.
join
(
project_root
,
'static'
,
'avatars'
)
avatars_dir
=
os
.
path
.
join
(
project_root
,
'static'
,
'avatars'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment