/-/databases and homepage maintain connection order, closes #1216

This commit is contained in:
Simon Willison 2021-06-01 20:03:07 -07:00
commit 807de378d0
4 changed files with 7 additions and 6 deletions

View file

@ -126,7 +126,8 @@ def make_app_client(
for extra_filename, extra_sql in extra_databases.items():
extra_filepath = os.path.join(tmpdir, extra_filename)
sqlite3.connect(extra_filepath).executescript(extra_sql)
files.append(extra_filepath)
# Insert at start to help test /-/databases ordering:
files.insert(0, extra_filepath)
os.chdir(os.path.dirname(filepath))
config = config or {}
for key, value in {