← Back to team overview

harvest-dev team mailing list archive

[Merge] lp:~dholbach/harvest/debug into lp:harvest

 

Daniel Holbach has proposed merging lp:~dholbach/harvest/debug into lp:harvest.

Requested reviews:
  harvest-dev (harvest-dev)

-- 
https://code.launchpad.net/~dholbach/harvest/debug/+merge/29193
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/debug into lp:harvest.
=== modified file 'INSTALL'
--- INSTALL	2010-05-28 01:39:16 +0000
+++ INSTALL	2010-07-05 10:17:28 +0000
@@ -1,4 +1,8 @@
-1. sudo apt-get install python-django python-launchpadlib python-django-openid-auth bzr python-django-debug-toolbar
+1. sudo apt-get install python-django python-launchpadlib python-django-openid-auth bzr 
+
+---
+Optional for Harvest hackers:
+  - sudo apt-get install python-django-debug-toolbar
 
 ---
 Optional for postgres usage:
@@ -15,6 +19,7 @@
 
 2.
  - cd harvest
+ - cp local_settings.py.sample local_settings.py
  - ./manage.py syncdb
  - ./manage.py init-harvest
  - ./manage.py update

=== added file 'harvest/local_settings.py.sample'
--- harvest/local_settings.py.sample	1970-01-01 00:00:00 +0000
+++ harvest/local_settings.py.sample	2010-07-05 10:17:28 +0000
@@ -0,0 +1,6 @@
+DATABASE_ENGINE = 'sqlite3'            	# Change to postgresql_psycopg2 for postgres
+DATABASE_NAME = 'harvest.db'    	# sqlite3 file or database name
+#DATABASE_USER = ''
+#DATABASE_PASSWORD = ''
+
+SECRET_KEY = '' 

=== modified file 'harvest/settings.py'
--- harvest/settings.py	2010-06-11 20:21:40 +0000
+++ harvest/settings.py	2010-07-05 10:17:28 +0000
@@ -9,6 +9,12 @@
 PROJECT_NAME = 'harvest'
 INTERNAL_IPS = ('127.0.0.1',) #for testing
 
+try:
+    import debug_toolbar
+    toolbar_available = True
+except ImportError:
+    toolbar_available = False
+
 from common import utils
 VERSION_STRING = utils.get_harvest_version(
                     os.path.join(PROJECT_PATH, "version"),
@@ -71,7 +77,6 @@
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.middleware.locale.LocaleMiddleware',
-    'debug_toolbar.middleware.DebugToolbarMiddleware', #for testing
 )
 
 ROOT_URLCONF = 'harvest.urls'
@@ -100,12 +105,19 @@
     'django.contrib.sites',
     'django.contrib.admin',
     'django_openid_auth',
-    'debug_toolbar', #for testing
     'opportunities',
     'filters',
     'common',
 )
 
+if toolbar_available:
+    INSTALLED_APPS += (
+        'debug_toolbar', #for testing
+    )
+    MIDDLEWARE_CLASSES += (
+        'debug_toolbar.middleware.DebugToolbarMiddleware', #for testing
+    )
+
 AUTHENTICATION_BACKENDS = (
     'django_openid_auth.auth.OpenIDBackend',
     'django.contrib.auth.backends.ModelBackend',


Follow ups