1. plurk
  2. solace

Commits

mitsuhiko  committed 2352964

Config uses correct temp dir by default for database now.

  • Participants
  • Parent commits e761b8a
  • Branches default

Comments (0)

Files changed (1)

File solace/settings.py

View file
 del with_statement
 
 # temporary imports, delete at end of file
-import os, sys, solace
+import os, sys, solace, tempfile
 
 # propagate early.  That way we can import "from solace import settings"
 # when the settings is not yet set up.  This is needed because during
 PLATFORM = os.name
 
 #: the database URI
-if PLATFORM == 'nt':
-    DATABASE_URI = 'sqlite:///C:/Temp/solace.db'
-else:
-    DATABASE_URI = 'sqlite:////tmp/solace.db'
+DATABASE_URI = 'sqlite:///%s/solace.db' % tempfile.gettempdir()
 
 #: the title of the website
 WEBSITE_TITLE = _(u'Plurk Solace')
 
 if 'SOLACE_SETTINGS_FILE' in os.environ:
     configure_from_file(os.environ['SOLACE_SETTINGS_FILE'])
-del os, sys, solace
+del os, sys, solace, tempfile