From be31a1a03c054beaba5005ac3fa4fea0a59e16df Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Sat, 8 Jun 2024 22:07:04 +0200 Subject: [PATCH] Fix minor startup issues (#873) --- apps/tagged_posts/models.py | 2 +- py4web/core.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/tagged_posts/models.py b/apps/tagged_posts/models.py index 61ad95e9..2117a8f8 100644 --- a/apps/tagged_posts/models.py +++ b/apps/tagged_posts/models.py @@ -18,7 +18,7 @@ ) def parse_post_content(content, post_item_id): - for word in re.compile("\#\w+").findall(content): + for word in re.compile(r"\#\w+").findall(content): db.tag_item.insert(name=word[1:], post_item_id=post_item_id) diff --git a/py4web/core.py b/py4web/core.py index c7e56a77..21863e12 100644 --- a/py4web/core.py +++ b/py4web/core.py @@ -2160,8 +2160,10 @@ def run(**kwargs): """Run the applications on apps_folder""" install_args(kwargs) + from py4web import __version__ # pylint: disable=import-outside-toplevel + click.secho(ART, fg="blue") - click.echo(f"Py4web: {version} on Python {sys.version}\n\n") + click.echo(f"Py4web: {__version__} on Python {sys.version}\n\n") # Start Reloader.import_apps() @@ -2172,7 +2174,7 @@ def run(**kwargs): kwargs["password_file"] ): click.echo( - f'You have not set a dashboard password. Run "{PY4WEB_CMD} set_password" to do so.' + f'\nYou have not set a dashboard password. Run "{PY4WEB_CMD} set_password" to do so.' ) elif "_dashboard" in Reloader.ROUTES and ( not kwargs["host"].startswith("unix:/")