database.py template for readonly db, fix typo (#1441)