use just once during upgradedb otherwise frontend's request processing

is out of application context

From docs: Setting a SERVER_NAME also by default enables URL generation
without a request context but with an application context.
This commit is contained in:
Filip Valder
2016-12-06 13:44:04 +01:00
parent 395ded0243
commit 3d4cc41c27
2 changed files with 1 additions and 1 deletions

View File

@@ -100,6 +100,7 @@ def testpdc():
def upgradedb():
""" Upgrades the database schema to the latest revision
"""
app.config["SERVER_NAME"] = 'localhost'
# TODO: configurable?
migrations_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'migrations')