heroku conversion step 1
authorCharles Connell <charles@connells.org>
Wed, 14 May 2014 16:33:20 +0000 (12:33 -0400)
committerCharles Connell <charles@connells.org>
Wed, 14 May 2014 16:33:20 +0000 (12:33 -0400)
Procfile [new file with mode: 0644]
fabfile.py
karmaworld/settings/common.py
karmaworld/settings/dev.py
karmaworld/settings/prod.py
karmaworld/settings/vmdev.py
karmaworld/urls.py
karmaworld/wsgi.py
reqs/common.txt
reqs/prod.txt
requirements.txt [new file with mode: 0644]

diff --git a/Procfile b/Procfile
new file mode 100644 (file)
index 0000000..3b127ce
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: gunicorn karmaworld.wsgi
index eca1e83c61bbdb78088694a09113fa07ce08b18c..1f0320efaab00053f870e79fae8c30d0ea0e3ff6 100644 (file)
@@ -262,7 +262,7 @@ def check_secrets():
     """
 
     secrets_path = env.code_root + '/karmaworld/secret'
-    secrets_files = ('filepicker.py', 'static_s3.py', 'db_settings.py', 'drive.py', 'client_secrets.json', 'drive.p12')
+    secrets_files = ('filepicker.py', 'static_s3.py', 'drive.py', 'client_secrets.json', 'drive.p12')
 
     errors = []
     for sfile in secrets_files:
index 173ab0c46ad1bce259e624279c4160b2b6f7a532..f387ca41fe9e0f12e13ef265f47698f6b23da290 100644 (file)
@@ -2,15 +2,12 @@
 # -*- coding:utf8 -*-
 # Copyright (C) 2012  FinalsClub Foundation
 """ Common settings and globals. """
-
-
 from datetime import timedelta
 import sys
 from os.path import abspath, basename, dirname, join, normpath
 from sys import path
-
 from djcelery import setup_loader
-
+import dj_database_url
 from karmaworld.secret.filepicker import FILEPICKER_API_KEY as fp_api
 
 FILEPICKER_API_KEY = fp_api
@@ -74,16 +71,7 @@ MANAGERS = ADMINS
 
 ########## DATABASE CONFIGURATION
 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
-DATABASES = {
-    'default': {
-        'ENGINE': 'django.db.backends.',
-        'NAME': '',
-        'USER': '',
-        'PASSWORD': '',
-        'HOST': '',
-        'PORT': '',
-    }
-}
+DATABASES = {'default': dj_database_url.config()}
 ########## END DATABASE CONFIGURATION
 
 
index 17a3822c3340d3c8de1993fee872d45f8a5c8255..d563696216cc6eb6ccde436862a4c1ca171feda3 100644 (file)
@@ -24,20 +24,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 ########## END EMAIL CONFIGURATION
 
 
-########## DATABASE CONFIGURATION
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
-DATABASES = {
-    'default': {
-        'ENGINE': 'django.db.backends.postgresql_psycopg2',
-        'NAME': 'karmanotes',
-        'USER': 'djkarma',
-        'PASSWORD': 'karma',
-        'HOST': 'localhost',
-        'PORT': '',  # Set to empty string for default. Not used with sqlite3.
-    }
-}
-########## END DATABASE CONFIGURATION
-
 ########## STATIC CONFIG
 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
 STATIC_URL = '/static/'
@@ -77,6 +63,8 @@ INSTALLED_APPS += (
     'django_nose',
 )
 
+DEBUG_TOOLBAR_PATCH_SETTINGS = False
+
 DEBUG_TOOLBAR_PANELS = (
     'debug_toolbar.panels.versions.VersionsPanel',
     'debug_toolbar.panels.timer.TimerPanel',
index 8ded87da6842d34c5c6a7763371b60963ab30aeb..04a5bc3144647db8ecc14334cb48c7bd13a99347 100644 (file)
@@ -8,10 +8,6 @@ from S3 import CallingFormat
 
 from common import *
 
-from karmaworld.secret.db_settings import PROD_DB_NAME
-from karmaworld.secret.db_settings import PROD_DB_USERNAME
-from karmaworld.secret.db_settings import PROD_DB_PASSWORD
-
 try:
     # Include email is settings are there
     from karmaworld.secret.email import SMTP_HOST
@@ -51,20 +47,6 @@ if EMAIL:
 ########## END EMAIL CONFIGURATION
 
 
-########## DATABASE CONFIGURATION
-DATABASES = {
-    'default': {
-    'ENGINE': 'django.db.backends.postgresql_psycopg2',
-    'NAME': PROD_DB_NAME,
-    'USER': PROD_DB_USERNAME,
-    'PASSWORD': PROD_DB_PASSWORD,
-    'HOST': '',
-    'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
-    }
-}
-########## END DATABASE CONFIGURATION
-
-
 ########## CACHE CONFIGURATION
 # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
 CACHES = {
index 6096b8f42b6cf039b08410606e5e4ecca73de0cc..619bc8d4aaf4b4253b76887dc509c8f1ffd3aa0e 100644 (file)
@@ -2,21 +2,14 @@
 # -*- coding:utf8 -*-
 # Copyright (C) 2012  FinalsClub Foundation
 """ Production settings and globals. """
-
-
 from os import environ
 from datetime import timedelta
 from S3 import CallingFormat
 
 from common import *
 
-
 from karmaworld.secret.static_s3 import *
 
-from karmaworld.secret.db_settings import PROD_DB_NAME
-from karmaworld.secret.db_settings import PROD_DB_USERNAME
-from karmaworld.secret.db_settings import PROD_DB_PASSWORD
-
 try:
     # Include email is settings are there
     from karmaworld.secret.email import SMTP_HOST
index 28c67c756ad05af7ed2172d9e407565b75265947..780abb753ea4ce7affe3554f73dbfdb44947eec3 100644 (file)
@@ -118,3 +118,11 @@ urlpatterns = patterns('',
 
     url(r'^$', CourseListView.as_view(), name='home'),
 )
+
+
+if settings.DEBUG:
+    import debug_toolbar
+    urlpatterns += patterns('',
+        url(r'^__debug__/', include(debug_toolbar.urls)),
+    )
+
index b29ded5ce785de0484c1e78cb78ef75580a3626e..dd75f2007930c01985ef8f09ddd0bcb6e9fda937 100644 (file)
@@ -14,17 +14,18 @@ framework.
 
 """
 import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "karmaworld.settings.dev")
 
+from dj_static import Cling
 import djcelery
 djcelery.setup_loader()
 
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "karmaworld.settings.prod")
 
 # This application object is used by any WSGI server configured to use this
 # file. This includes Django's development server, if the WSGI_APPLICATION
 # setting points here.
 from django.core.wsgi import get_wsgi_application
-application = get_wsgi_application()
+application = Cling(get_wsgi_application())
 
 # Apply WSGI middleware here.
 # from helloworld.wsgi import HelloWorldApplication
index 60d1d3d6fb3c47c2ff1ccadcc49a57601ce4d8db..27438b72acf16feb3388eede50092c14ca1f7881 100644 (file)
@@ -27,3 +27,5 @@ git+https://github.com/btbonval/django-ajax-selects-cascade.git
 psycopg2
 pyth
 querystring_parser
+gunicorn
+dj-database-url
index 41aa7b5c9049971239fdcb290bebb9eb0f68605b..bd4928cdbeb52f508b742c82d8751be79827983f 100644 (file)
@@ -1,6 +1,5 @@
 -r common.txt
 cssmin==0.1.4
 pylibmc==1.2.3
-gunicorn==0.14.3
 jsmin==2.0.2
 amqplib==1.0.2
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..567e7a6
--- /dev/null
@@ -0,0 +1,46 @@
+Django>=1.5.0,<1.6.0
+django-celery==3.0.21
+django-compressor==1.2
+Fabric==1.5.3
+South==0.8.4
+supervisor==3.0b1
+oauth2client==1.0
+urllib3==1.5
+google-api-python-client==1.0
+django-grappelli==2.4.8
+django-taggit
+git+https://github.com/btbonval/django-filepicker.git
+filemagic==1.6
+requests
+beautifulsoup4
+pyopenssl
+python-twitter
+gdshortener
+git+https://github.com/flaptor/indextank-py.git
+git+https://github.com/jhilker/html2text.git
+django-allauth
+boto
+django-storages==1.1.4
+django-reversion
+django-ajax-selects
+git+https://github.com/btbonval/django-ajax-selects-cascade.git
+psycopg2
+pyth
+querystring_parser
+gunicorn
+dj-database-url
+django-kombu==0.9.4
+django-debug-toolbar
+django-debug-toolbar-template-timings
+ipython==0.13.1
+ipdb==0.7
+django-extensions==1.0.3 # some extra debugging tools for manage.py
+# Testing requirements
+django-nose==1.1
+coverage==3.6
+selenium==2.38.4
+mock
+cssmin==0.1.4
+pylibmc==1.2.3
+jsmin==2.0.2
+amqplib==1.0.2