Mercurial > public > madeira
changeset 59:5e44f67c5d83
Changes to put the new site in production in a virtualenv.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 11 Apr 2012 20:22:35 -0500 |
parents | db9c66873680 |
children | 2322664cf934 |
files | .hgignore madeira/apache/madeira.wsgi madeira/settings/production.py requirements.txt |
diffstat | 4 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Wed Apr 11 18:46:34 2012 -0500 +++ b/.hgignore Wed Apr 11 20:22:35 2012 -0500 @@ -3,3 +3,5 @@ *.pyc *.swp secrets.json +media +static_serve
--- a/madeira/apache/madeira.wsgi Wed Apr 11 18:46:34 2012 -0500 +++ b/madeira/apache/madeira.wsgi Wed Apr 11 20:22:35 2012 -0500 @@ -1,12 +1,14 @@ import os import sys +import site OFFLINE = False -sys.path.append('/home/var/django-sites/madeira/django-trunk') -sys.path.append('/home/var/django-sites/madeira/madeira-trunk') -sys.path.append('/home/var/django-sites/madeira/madeira-trunk/mysite') -os.environ['PYTHON_EGG_CACHE'] = '/home/var/django-sites/madeira/eggs/' +site.addsitedir('/home/var/django-sites/virtualenvs/madeira/lib/python2.5/site-packages') + +sys.path.append('/home/var/django-sites/virtualenvs/madeira/madeira') +sys.path.append('/home/var/django-sites/virtualenvs/madeira/madeira/madeira') +os.environ['PYTHON_EGG_CACHE'] = '/home/var/django-sites/virtualenvs/madeira/eggs/' def offline_handler(environ, start_response): @@ -30,7 +32,7 @@ if not OFFLINE: - os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings.production' + os.environ['DJANGO_SETTINGS_MODULE'] = 'madeira.settings.production' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() else:
--- a/madeira/settings/production.py Wed Apr 11 18:46:34 2012 -0500 +++ b/madeira/settings/production.py Wed Apr 11 20:22:35 2012 -0500 @@ -8,7 +8,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'madeira_django', + 'NAME': SECRETS['DB_NAME'], 'USER': SECRETS['DB_USER'], 'PASSWORD': SECRETS['DB_PASSWORD'], },