aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/initialization.py14
-rw-r--r--pyaggr3g470r/search.py1
2 files changed, 7 insertions, 8 deletions
diff --git a/pyaggr3g470r/initialization.py b/pyaggr3g470r/initialization.py
index 5777ca12..15e83563 100644
--- a/pyaggr3g470r/initialization.py
+++ b/pyaggr3g470r/initialization.py
@@ -10,18 +10,18 @@ import sys
from mongoengine import *
from werkzeug import generate_password_hash
+import conf
import models
if __name__ == "__main__":
# Point of entry in execution mode
- database = sys.argv[1]
- firstname = sys.argv[2]
- lastname = sys.argv[3]
- email = sys.argv[4]
- password = sys.argv[5]
+ firstname = sys.argv[1]
+ lastname = sys.argv[2]
+ email = sys.argv[3]
+ password = sys.argv[4]
- db = connect(database)
- db.drop_database(database)
+ db = connect(conf.DATABASE_NAME)
+ db.drop_database(conf.DATABASE_NAME)
user = models.User(firstname=firstname, lastname=lastname, \
email=email, pwdhash=generate_password_hash(password))
diff --git a/pyaggr3g470r/search.py b/pyaggr3g470r/search.py
index 4b8602f7..6be04588 100644
--- a/pyaggr3g470r/search.py
+++ b/pyaggr3g470r/search.py
@@ -36,7 +36,6 @@ from whoosh.qparser import QueryParser
from whoosh.writing import AsyncWriter
from collections import defaultdict
-import conf
import utils
import models
bgstack15