summaryrefslogtreecommitdiff
path: root/kpov_judge/web
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/web')
-rwxr-xr-xkpov_judge/web/kpov_judge/kpov_judge.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py
index 6e94f05..b832007 100755
--- a/kpov_judge/web/kpov_judge/kpov_judge.py
+++ b/kpov_judge/web/kpov_judge/kpov_judge.py
@@ -32,13 +32,7 @@ params_meta = {'neznano_ime_naloge': {'opis':'NEZNANA NALOGA', 'w': False}}
@app.before_request
def before_request():
- g.db = pymongo.MongoClient(app.config['DB_HOST']).kpov
- try:
- user = app.config['USERNAME']
- password = app.config['PASSWORD']
- g.db.authenticate(user, password)
- except Exception as e:
- raise e #no auth or auth config?
+ g.db = pymongo.MongoClient(app.config['DB_URI']).get_default_database()
@app.route('/')