Changeset - 6f540a0e3f50
[Not reviewed]
0 2 0
Brett Smith (brett) - 6 years ago 2016-12-03 03:17:42
brett@sfconservancy.org
Remove hardcoded references to /var/www.

This makes it easier to run the code elsewhere, like a development
environment.
2 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
www/conservancy/settings.py
Show inline comments
...
 
@@ -19,2 +19,4 @@
 

	
 
import os.path
 

	
 
from djangocommonsettings import *
...
 
@@ -33,11 +35,8 @@ REDIRECT_TABLE = {
 

	
 
# import os
 
# BASE_DIR = os.path.dirname(os.path.dirname(__file__))
 

	
 
# from os.path import join
 
# TEMPLATE_DIRS = (
 
#     join(BASE_DIR,  'templates'),
 
# )
 
# NOTE: trailing comma is required to force this to be a tuple
 
TEMPLATE_DIRS = ( '/var/www/conservancy/templates', '/var/www/conservancy/static', )
 
_root_dir = os.path.abspath(os.path.dirname(__file__))
 
TEMPLATE_DIRS = (
 
    os.path.join(_root_dir, 'templates'),
 
    os.path.join(_root_dir, 'static'),
 
)
 
del _root_dir
 

	
www/wsgicustom.wsgi
Show inline comments
...
 
@@ -5,3 +5,4 @@ import sys
 

	
 
sys.path = ['/var/www'] + sys.path
 
root_dir = os.path.abspath(os.path.dirname(__file__))
 
sys.path.insert(0, root_dir)
 
os.environ['DJANGO_SETTINGS_MODULE'] = 'conservancy.settings'
0 comments (0 inline, 0 general)