# HG changeset patch # User Brian Neal # Date 1334193755 18000 # Node ID 5e44f67c5d83b544791c54d376b1543a9456cf4c # Parent db9c668736807d5756c4515a0e402cdbc32120d2 Changes to put the new site in production in a virtualenv. diff -r db9c66873680 -r 5e44f67c5d83 .hgignore --- 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 diff -r db9c66873680 -r 5e44f67c5d83 madeira/apache/madeira.wsgi --- 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: diff -r db9c66873680 -r 5e44f67c5d83 madeira/settings/production.py --- 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'], }, diff -r db9c66873680 -r 5e44f67c5d83 requirements.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/requirements.txt Wed Apr 11 20:22:35 2012 -0500 @@ -0,0 +1,8 @@ +Django==1.3.1 +MySQL-python==1.2.3 +docutils==0.8.1 +python-memcached==1.48 +wsgiref==0.1.2 +# +# PIL is also hacked into the virtualenv via a symlink to the site-packages version +#