Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't hardcode INSTALL_DIR and use os.path.join

Makes it easier to run bleep on non-POSIX systems and is more python
"best practice-y"
  • Loading branch information...
commit c37f3e99e9c503e9df70ac288fa83d41cc028939 1 parent 4ca5b72
@SEJeff authored
Showing with 7 additions and 5 deletions.
  1. +1 −1  README.md
  2. +6 −4 settings.py
View
2  README.md
@@ -18,7 +18,7 @@ Bleep! is an open source project built on the
### Configuration
-Edit django settings.py file to set INSTALL_DIR and database.
+Edit django settings.py file to set up the database.
## TODO
View
10 settings.py
@@ -1,14 +1,16 @@
# Django settings for bleep project.
+import os
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-INSTALL_DIR='/Users/alexh/bleep-workspace/bleep'
+INSTALL_DIR= os.path.dirname(os.path.abspath(__file__))
# Update the modules path here
print 'debuggery: Updating the modules path in %s !' % __file__
import sys
-sys.path.append(INSTALL_DIR+'/services')
+sys.path.append(os.path.join(INSTALL_DIR, 'services'))
ADMINS = (
@@ -94,7 +96,7 @@
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
- INSTALL_DIR+"/templates",
+ os.path.join(INSTALL_DIR, "/templates"),
)
INSTALLED_APPS = (
@@ -110,7 +112,7 @@
# 'django.contrib.admindocs',
)
-STATIC_DOC_ROOT = INSTALL_DIR+'/assets'
+STATIC_DOC_ROOT = os.path.join(INSTALL_DIR, 'assets')
AUTH_PROFILE_MODULE = "bleeps.UserProfile"

0 comments on commit c37f3e9

Please sign in to comment.
Something went wrong with that request. Please try again.