aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/mongodb.py4
-rwxr-xr-xsource/pyAggr3g470r.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/mongodb.py b/source/mongodb.py
index 64bd9218..95d7560c 100644
--- a/source/mongodb.py
+++ b/source/mongodb.py
@@ -227,11 +227,11 @@ class Articles(object):
return collections
# Functions on database
- def drop_database(self):
+ def drop_database(self, db_name="pyaggr3g470r"):
"""
Drop all the database
"""
- self.connection.drop_database('pyaggr3g470r')
+ self.connection.drop_database(db_name)
if __name__ == "__main__":
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 2fac78e0..6a71b7f2 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -1206,7 +1206,7 @@ class pyAggr3g470r(object):
"""
Delete all articles.
"""
- self.mongo.drop_database()
+ self.mongo.drop_database(conf.MONGODB_DBNAME)
return self.index()
drop_base.exposed = True
bgstack15