Permalink
Browse files

Fixing some management commands for new paths.

  • Loading branch information...
1 parent 3ec02e3 commit 632a6f7600ed33f645fd48b2dadec06f79e13dd1 @micolous micolous committed Apr 20, 2012
@@ -27,16 +27,18 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
executable_files = [
'manage.py',
- os.path.join('backend', 'tollgate.py'),
- os.path.join('backend', 'tollgate.sh'),
- os.path.join('debian', 'init.d', 'tollgate-backend'),
- os.path.join('debian', 'init.d', 'tollgate-captivity'),
- os.path.join('captive_landing', 'tproxy.py'),
+ os.path.join('tollgate', 'backend', 'tollgate_backend.py'),
+ os.path.join('platform', 'debian', 'init.d', 'tollgate-backend'),
+ os.path.join('platform', 'debian', 'init.d', 'tollgate-captivity'),
+ os.path.join('tollgate', 'captive_landing', 'tproxy.py'),
]
+ tollgate_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
+
for x in executable_files:
# chmod the file such that all that have read access have execute as well.
- fp = os.path.join(settings.PROJECT_PATH, x)
+ fp = os.path.join(tollgate_path, x)
+ print " %s" % fp
mode = os.stat(fp).st_mode
if mode & stat.S_IRUSR:
@@ -26,7 +26,7 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
# take a copy of the original local.py
- local_py_location = os.path.join(settings.PROJECT_PATH, 'settings', 'local.py')
+ local_py_location = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'settings', 'local.py'))
if os.path.exists(local_py_location):
fh = open(local_py_location, 'rb')
local_py = fh.read()
@@ -65,3 +65,5 @@ def handle(self, *args, **kwargs):
fh.flush()
fh.close()
+ print "Wrote settings to %s" % local_py_location
+
@@ -17,7 +17,7 @@
"""
import os
-PROJECT_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
+PROJECT_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
# You probably should turn this off in an actual deployment. We have stricter tracebacks anyways.
DEBUG = True

0 comments on commit 632a6f7

Please sign in to comment.