Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow specifying DB when initialized.

  • Loading branch information...
commit 15dd0162a290a82d161c1dcddb926754c38d617d 1 parent a7be532
@coleifer authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 flask_peewee/db.py
View
7 flask_peewee/db.py
@@ -6,10 +6,13 @@
class Database(object):
- def __init__(self, app):
+ def __init__(self, app, database=None):
self.app = app
+ self.database = database
+
+ if self.database is None:
+ self.load_database()
- self.load_database()
self.register_handlers()
self.Model = self.get_model_class()
Please sign in to comment.
Something went wrong with that request. Please try again.