Skip to content

Commit e121653

Browse files
authored
Merge pull request #52 from python-microservices/fix/error_with_static_files
Fix error when Flask search for static files in wrong path
2 parents ec39632 + cc6995e commit e121653

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyms/flask/app/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def init_app(self) -> Flask:
6363
application = app.app
6464
application._connexion_app = app
6565
else:
66-
application = Flask(__name__)
66+
application = Flask(__name__, static_folder=os.path.join(self.path, 'static'),
67+
template_folder=os.path.join(self.path, 'templates'))
68+
69+
application.root_path = self.path
6770

6871
return application
6972

0 commit comments

Comments
 (0)