Browse Source

Merge pull request #146 from justanr/whoosh_storage_change

Change whoosh_index to use MajorMinor for storage directory
Peter Justin 9 years ago
parent
commit
25f1706261
1 changed files with 4 additions and 1 deletions
  1. 4 1
      flaskbb/configs/default.py

+ 4 - 1
flaskbb/configs/default.py

@@ -10,6 +10,9 @@
     :license: BSD, see LICENSE for more details.
 """
 import os
+import sys
+
+_VERSION_STR = '{0.major}{0.minor}'.format(sys.version_info)
 
 
 class DefaultConfig(object):
@@ -50,7 +53,7 @@ class DefaultConfig(object):
     WTF_CSRF_SECRET_KEY = "reallyhardtoguess"
 
     # Searching
-    WHOOSH_BASE = os.path.join(_basedir, "whoosh_index")
+    WHOOSH_BASE = os.path.join(_basedir, "whoosh_index", _VERSION_STR)
 
     # Auth
     LOGIN_VIEW = "auth.login"