From 561347d7eb028bd4f45f886e5e698ec04065c921 Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Mon, 11 Apr 2016 13:44:07 -0700 Subject: [PATCH 1/5] try to jump to newest version of kombu to work with Python 2.7.11 --- requirements_versioned.pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_versioned.pip b/requirements_versioned.pip index 1130df0f..8f94b13d 100644 --- a/requirements_versioned.pip +++ b/requirements_versioned.pip @@ -47,7 +47,7 @@ github3.py==0.9.5 html5lib==1.0b3 httplib2==0.7.5 isodate==0.5.1 -kombu==2.4.5 +kombu==3.0.35 lxml==2.3.5 defusedxml==0.4.1 mechanize==0.2.5 From b35e09a2639aab53c3afa2bcb0d74244dc983428 Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Mon, 11 Apr 2016 15:38:49 -0700 Subject: [PATCH 2/5] upgrades in celery related modules to deal with upgrade to Python 2.7.11, etc ALLOWED_HOSTS settign needed now upgrade wsgi file (just in case) --- deploy/please.wsgi | 8 ++++---- requirements_versioned.pip | 10 +++++----- settings/please.py | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/deploy/please.wsgi b/deploy/please.wsgi index bfc2b5bd..3fe5a14c 100644 --- a/deploy/please.wsgi +++ b/deploy/please.wsgi @@ -2,8 +2,8 @@ import os -import django.core.handlers.wsgi - +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.please") os.environ['CELERY_LOADER'] = 'django' -os.environ['DJANGO_SETTINGS_MODULE'] = 'regluit.settings.please' -application = django.core.handlers.wsgi.WSGIHandler() + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() \ No newline at end of file diff --git a/requirements_versioned.pip b/requirements_versioned.pip index 8f94b13d..31639aef 100644 --- a/requirements_versioned.pip +++ b/requirements_versioned.pip @@ -11,24 +11,24 @@ South==0.8.4 SPARQLWrapper==1.6.4 WebOb==1.2.3 WebTest==1.4.0 -amqplib==1.0.2 +amqp==1.4.9 anyjson==0.3.3 -billiard==2.7.3.12 +billiard==3.3.0.23 boto==2.8.0 #git+ssh://git@github.com/Gluejar/boto.git@2.3.0 -celery==3.0.9 +celery==3.1.23 certifi==2015.04.28 # pip installing pillow seems to delete distribute # but having distribute in requirements starting to cause problems # distribute==0.6.28 -django-celery==3.0.9 +django-celery==3.1.17 django-ckeditor==4.5.1 #django-email-change==0.2.3 git+git://github.com/eshellman/django-email-change.git@582112797466b9fb427ba3c4da3b14b426a28132 django-endless-pagination==2.0 django-extensions==0.9 django-jsonfield==0.9.10 -django-kombu==0.9.4 +#django-kombu==0.9.4 django-maintenancemode==0.10 django-mptt==0.7.4 django-nose-selenium==0.7.3 diff --git a/settings/please.py b/settings/please.py index 2a5a6f47..6c6b64dc 100644 --- a/settings/please.py +++ b/settings/please.py @@ -1,5 +1,6 @@ from regluit.settings.common import * +ALLOWED_HOSTS = ['please.unglue.it'] DEBUG = False TEMPLATE_DEBUG = DEBUG From 6df2db650a8f2ed3c6a189481f9fdc8819274dc8 Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Mon, 11 Apr 2016 16:03:27 -0700 Subject: [PATCH 3/5] use dj16ry branch --- vagrant/please.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrant/please.yml b/vagrant/please.yml index 7089670d..615437a6 100644 --- a/vagrant/please.yml +++ b/vagrant/please.yml @@ -98,7 +98,7 @@ - name: clone the regluit git repo into /opt/regluit sudo: no - git: repo=ssh://git@github.com/Gluejar/regluit.git dest=/opt/regluit accept_hostkey=True force=yes version=sysadmin + git: repo=ssh://git@github.com/Gluejar/regluit.git dest=/opt/regluit accept_hostkey=True force=yes version=dj16ry # installing mysql From 2c8d7fd287c12b22cb5167de3c4335f1cc644abd Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Tue, 12 Apr 2016 09:35:39 -0700 Subject: [PATCH 4/5] add SOUTH_MIGRATION_MODULES = { 'djcelery': 'djcelery.south_migrations', } --- settings/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings/common.py b/settings/common.py index a4152bbf..5a1c4397 100644 --- a/settings/common.py +++ b/settings/common.py @@ -461,9 +461,11 @@ DROPBOX_KEY = '4efhwty5aph52bd' #for unglue.it, just.unglue.it # generated from rdhyee account GITHUB_PUBLIC_TOKEN = 'f702409f913d7f9046f93c677710f829e2b599c9' +# https://github.com/celery/django-celery/blob/master/docs/introduction.rst#for-django-17-and-newer SOUTH_MIGRATION_MODULES = { 'default': 'social.apps.django_app.default.south_migrations', 'tastypie': 'tastypie.south_migrations', + 'djcelery': 'djcelery.south_migrations', } MOBIGEN_URL = "https://docker.gluejar.com:5001/mobigen" From 877b296128a1dea7be05f3e54b61d7f1e83af519 Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Tue, 12 Apr 2016 10:48:04 -0700 Subject: [PATCH 5/5] commenting out payment.tests.BasicGuiTest because for some reason the suite() is not being honored and BasicGuiTest is being run when I run django-admin.py test payment have to explore further: http://stackoverflow.com/questions/21572921/django-celery-test-runner-doing-very-strange-things --- payment/tests.py | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/payment/tests.py b/payment/tests.py index 84cf2f7a..db9fa11e 100644 --- a/payment/tests.py +++ b/payment/tests.py @@ -354,31 +354,31 @@ class TransactionTest(TestCase): self.assertEqual(t.type, EXECUTE_TYPE_CHAINED_INSTANT) self.assertEqual(t.amount, D('12.34')) -class BasicGuiTest(TestCase): - def setUp(self): - self.verificationErrors = [] - # This is an empty array where we will store any verification errors - # we find in our tests +# class BasicGuiTest(TestCase): +# def setUp(self): +# self.verificationErrors = [] +# # This is an empty array where we will store any verification errors +# # we find in our tests - setup_selenium() - self.TEST_SERVER_URL = "http://ry-dev.dyndns.org" - self.selenium = webdriver.Firefox() - set_test_logging() - def testFrontPage(self): - sel = self.selenium - sel.get(self.TEST_SERVER_URL) - # if we click on the learn more, does the panel expand? - # click on a id=readon -- or the Learn More span - #sel.find_elements_by_css_selector('a#readon')[0].click() - #time.sleep(2.0) - # the learn more panel should be displayed - #self.assertTrue(sel.find_elements_by_css_selector('div#user-block-hide')[0].is_displayed()) - # click on the panel again -- and panel should not be displayed - #sel.find_elements_by_css_selector('a#readon')[0].click() - #time.sleep(2.0) - #self.assertFalse(sel.find_elements_by_css_selector('div#user-block-hide')[0].is_displayed()) - def tearDown(self): - self.selenium.quit() +# setup_selenium() +# self.TEST_SERVER_URL = "http://ry-dev.dyndns.org" +# self.selenium = webdriver.Firefox() +# set_test_logging() +# def testFrontPage(self): +# sel = self.selenium +# sel.get(self.TEST_SERVER_URL) +# # if we click on the learn more, does the panel expand? +# # click on a id=readon -- or the Learn More span +# #sel.find_elements_by_css_selector('a#readon')[0].click() +# #time.sleep(2.0) +# # the learn more panel should be displayed +# #self.assertTrue(sel.find_elements_by_css_selector('div#user-block-hide')[0].is_displayed()) +# # click on the panel again -- and panel should not be displayed +# #sel.find_elements_by_css_selector('a#readon')[0].click() +# #time.sleep(2.0) +# #self.assertFalse(sel.find_elements_by_css_selector('div#user-block-hide')[0].is_displayed()) +# def tearDown(self): +# self.selenium.quit() class AccountTest(TestCase):