From: Ɓukasz Rekucki Date: Sun, 11 Apr 2010 17:47:05 +0000 (+0200) Subject: Removed debugging applications from main settings. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/f7712b20c83a39b1020064cb87b1128f87b0ae51?hp=ea335ef160fbe5f8488e8bef51a4706163ba9964 Removed debugging applications from main settings. Deployment searches for site-specific requirements. --- diff --git a/fabfile.py b/fabfile.py index 2897a8dd..b132b9dd 100644 --- a/fabfile.py +++ b/fabfile.py @@ -44,6 +44,7 @@ def common(): env.path = os.path.join(env.sandbox, env.project_name) env.target = os.path.join(env.path, 'bin', 'python') + # ========= # = Tasks = # ========= @@ -90,7 +91,7 @@ def deploy(): upload_wsgi_script() # upload_vhost_sample() install_requirements() - copy_localsettings() + hardlink_localsettings() symlink_current_release() migrate() django_compress() @@ -152,19 +153,27 @@ def upload_wsgi_script(): def install_requirements(): "Install the required packages from the requirements file using pip" - print '>>> install requirements' + + print '>>> Instaling global requirements' require('release', provided_by=[deploy]) run('cd %(path)s; %(path)s/bin/pip install -r %(path)s/releases/%(release)s/%(project_name)s/config/requirements.txt' % env, pty=True) + print '>>> Instaling site requirements' + + with settings(warn_only=True): + run('cd %(path)s; %(path)s/bin/pip install -r %(sandbox)s/etc/%(project_name)s/requirements.txt' % env, pty=True) + + +def hardlink_localsettings(): + "Hardlink localsettings.py from root directory to release directory (if this file exists)" + print ">>> Hardlink localsettings" + require('release', 'path', provided_by=[deploy]) + require('sandbox', provided_by=[staging, production]) + + # hardlink localsettings + with settings(warn_only=True): + run('ln %(sandbox)s/etc/%(project_name)s/localsettings.py %(path)s/releases/%(release)s/%(project_name)s' % env) -#def copy_localsettings(): -# "Copy localsettings.py from root directory to release directory (if this file exists)" -# print ">>> copy localsettings" -# require('release', 'path', provided_by=[deploy]) -# require('sandbox', provided_by=[staging, production]) -# -# with settings(warn_only=True): -# run('cp %(sandbox)s/etc/%(project_name)s/localsettings.py %(path)s/releases/%(release)s/%(project_name)s' % env) def symlink_current_release(): "Symlink our current release" diff --git a/platforma/config/platforma.wsgi.template b/platforma/config/platforma.wsgi.template index f16d9b87..b1b35b46 100644 --- a/platforma/config/platforma.wsgi.template +++ b/platforma/config/platforma.wsgi.template @@ -15,7 +15,6 @@ sys.path = [ '%(path)s/releases/current', '%(path)s/releases/current/apps', '%(path)s/releases/current/lib', - '%(sandbox)s/etc/%(project_name)s, ] + sys.path # Run Django diff --git a/platforma/config/requirements.txt b/platforma/config/requirements.txt index 4cf362bd..081792d8 100644 --- a/platforma/config/requirements.txt +++ b/platforma/config/requirements.txt @@ -16,5 +16,4 @@ south>=0.6 ## Debugging utils, uncomment this if you want tests # django-nose>=0.0.3 -# django-debug-toolbar>=0.8 - +# django-debug-toolbar>=0.8 \ No newline at end of file diff --git a/platforma/settings.py b/platforma/settings.py index 90ecd27d..83a6f090 100644 --- a/platforma/settings.py +++ b/platforma/settings.py @@ -188,9 +188,6 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.admindocs', - 'django_nose', - 'debug_toolbar', - 'compress', 'south', 'sorl.thumbnail',