Remove hardcoded references to /var/www.
This makes it easier to run the code elsewhere, like a development environment.
This commit is contained in:
		
							parent
							
								
									9822895971
								
							
						
					
					
						commit
						6f540a0e3f
					
				
					 2 changed files with 10 additions and 10 deletions
				
			
		|  | @ -17,6 +17,8 @@ | ||||||
| # along with this program in a file in the toplevel directory called | # along with this program in a file in the toplevel directory called | ||||||
| # "AGPLv3".  If not, see <http://www.gnu.org/licenses/>. | # "AGPLv3".  If not, see <http://www.gnu.org/licenses/>. | ||||||
| 
 | 
 | ||||||
|  | import os.path | ||||||
|  | 
 | ||||||
| from djangocommonsettings import * | from djangocommonsettings import * | ||||||
| 
 | 
 | ||||||
| SITE_ID = 2 | SITE_ID = 2 | ||||||
|  | @ -31,15 +33,12 @@ REDIRECT_TABLE = { | ||||||
|     'www.sf-conservancy.org': 'sfconservancy.org', |     'www.sf-conservancy.org': 'sfconservancy.org', | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # import os | _root_dir = os.path.abspath(os.path.dirname(__file__)) | ||||||
| # BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | TEMPLATE_DIRS = ( | ||||||
| 
 |     os.path.join(_root_dir, 'templates'), | ||||||
| # from os.path import join |     os.path.join(_root_dir, 'static'), | ||||||
| # TEMPLATE_DIRS = ( | ) | ||||||
| #     join(BASE_DIR,  'templates'), | del _root_dir | ||||||
| # ) |  | ||||||
| # NOTE: trailing comma is required to force this to be a tuple |  | ||||||
| TEMPLATE_DIRS = ( '/var/www/conservancy/templates', '/var/www/conservancy/static', ) |  | ||||||
| 
 | 
 | ||||||
| # try: | # try: | ||||||
| #     from djangodebug import conservancy_hostname as FORCE_CANONICAL_HOSTNAME | #     from djangodebug import conservancy_hostname as FORCE_CANONICAL_HOSTNAME | ||||||
|  |  | ||||||
|  | @ -3,7 +3,8 @@ | ||||||
| import os | import os | ||||||
| import sys | 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' | os.environ['DJANGO_SETTINGS_MODULE'] = 'conservancy.settings' | ||||||
| 
 | 
 | ||||||
| from django.core.wsgi import get_wsgi_application | from django.core.wsgi import get_wsgi_application | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brett Smith
						Brett Smith