Skip to content

Commit 4e72272

Browse files
committed
apache
1 parent d1de1d9 commit 4e72272

File tree

7 files changed

+33
-6
lines changed

7 files changed

+33
-6
lines changed

REPO_ROOT.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import os
2+
3+
HOMEDIR = __file__[:-12]

ROOT_URL.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import os
2+
3+
HOMEDIR = __file__
4+
REPO_ROOT = HOMEDIR.split('/')[-2]
5+
ROOT_URLCONF = REPO_ROOT + '.urls'

ROOT_URLCONF.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import os
2+
3+
HOMEDIR = __file__[:-15]
4+
ROOT_URLCONF = REPO_ROOT + '.urls'

apache/django.wsgi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os, sys
2+
3+
sys.path = ['/home/andrew/DATAFLOW/dataflow', '/home/andrew/DATAFLOW/dataflow/apps/tracks'] + sys.path
4+
5+
os.environ['DJANGO_SETTINGS_MODULE'] = 'dataflow.settings'
6+
import django.core.handlers.wsgi
7+
application = django.core.handlers.wsgi.WSGIHandler()

apache/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import os
2+
print __file__

settings.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Django settings for dataflow project.
22
import os
3+
import ROOT_URL
4+
5+
36
HOMEDIR = __file__[:-12]
47
DEBUG = True
58
TEMPLATE_DEBUG = DEBUG
6-
7-
89
template_dir = os.path.join(HOMEDIR, r'site-templates')
910
static_dir = os.path.join(HOMEDIR, r'static')
1011
#print 'template', template_dir
@@ -109,8 +110,13 @@
109110
)
110111

111112
REPO_ROOT = HOMEDIR.split('/')[-2]
112-
ROOT_URLCONF = REPO_ROOT + '.urls'
113-
print 'root', ROOT_URLCONF
113+
#ROOT_URLCONF = REPO_ROOT + '.urls'
114+
115+
ROOT_URLCONF = ROOT_URL.ROOT_URLCONF
116+
117+
118+
#print 'root', ROOT_URL.REPO_ROOT
119+
#print 'root', ROOT_URL.ROOT_URLCONF
114120

115121
TEMPLATE_DIRS = (template_dir,
116122
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".

urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
## PULLS VIEWS FROM TRACKS/VIEWS
99
## WE WOULD LIKE IT TO PULL FROM APPS/TRACKS/VIEWS
10-
from django.conf import settings
10+
import ROOT_URL
1111

12-
urlpatterns = patterns(settings.REPO_ROOT + '.apps.tracks.views',
12+
urlpatterns = patterns(ROOT_URL.REPO_ROOT + '.apps.tracks.views',
1313
('^hello/$', 'xhr_test'),
1414
('^test/$','mytest'),
1515
('^listWirings/$', 'listWirings'),

0 commit comments

Comments
 (0)