don't delete the database specific config entries from the app #56

Merged
merged 1 commit into from Dec 21, 2012
+2 −2
Split
View
4 flask_peewee/db.py
@@ -17,8 +17,8 @@ def __init__(self, app):
def load_database(self):
self.database_config = self.app.config['DATABASE']
try:
- self.database_name = self.database_config.pop('name')
- self.database_engine = self.database_config.pop('engine')
+ self.database_name = self.database_config.get('name')
+ self.database_engine = self.database_config.get('engine')
except KeyError:
raise ImproperlyConfigured('Please specify a "name" and "engine" for your database')