Skip to content

Commit

Permalink
Blockops prefix in deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelKrispin committed Jul 19, 2023
1 parent 98ab576 commit fcf4238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions dynamic_site/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ class Site:
def __init__(
self,
apps_path: str,
url_prefix: str = "",
application_root: str = "/",
enforce_dev_mode: bool = False,
escape_html_in_md: bool = True,
verbose: bool = False,
) -> None:
self.apps_path = apps_path
self.url_prefix = url_prefix
self.application_root = application_root
self.enforce_dev_mode = enforce_dev_mode
self.dynamic_site_path = os.path.dirname(dynamic_site.__file__)
self.render_md = mistune.create_markdown(
Expand Down Expand Up @@ -218,7 +218,8 @@ def app_path_documentation(app_path):
documentation = open(f"{self.apps_path}/{app_path}.md").read()
return jsonify({"text": documentation})

self.flask_app.register_blueprint(bp, url_prefix=self.url_prefix)
self.flask_app.register_blueprint(bp)
self.flask_app.config["APPLICATION_ROOT"] = self.application_root

def wsgi(self) -> Flask:
return self.flask_app
Expand Down
2 changes: 1 addition & 1 deletion web.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def deploy():
site = Site(
apps_path="web_apps",
url_prefix="/blockops",
application_root="/blockops",
enforce_dev_mode=False,
escape_html_in_md=False,
)
Expand Down

0 comments on commit fcf4238

Please sign in to comment.