From 808a532359b4259a857328f8b52b4e7cfea3f827 Mon Sep 17 00:00:00 2001 From: echoduck Date: Oct 24 2018 11:16:42 +0000 Subject: [PATCH 1/4] Added celery and redis to requirements.txt --- diff --git a/requirements/base.txt b/requirements/base.txt index 8295aa0..77fcef5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -34,3 +34,4 @@ factory-boy==2.9.2 opbeat==3.3 mozilla-django-oidc==1.0.0 fedmsg==1.1.1 +celery[redis]==4.2.1 From 738759278ad3e7fc1f63ac9e446cb0d9e08c582b Mon Sep 17 00:00:00 2001 From: echoduck Date: Oct 24 2018 11:30:21 +0000 Subject: [PATCH 2/4] Updated README with instructions on setting up OpenID Connect --- diff --git a/README.md b/README.md index 7a83ec1..53bba5d 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,19 @@ the correct ``DJANGO_SETTINGS_MODULE``, for example with:: source virtualenv/bin/activate pip install -r requirements/dev.txt export DJANGO_SETTINGS_MODULE=happinesspackets.settings.dev + +Before running the server locally, you must collect all the static files and perform a database migration. ./manage.py collectstatic python manage.py migrate - ./t + +In order for the login and send views to work, you must supply an OpenID Connect Client ID and Client Secret: + + oidc-register https://iddev.fedorainfracloud.org/openidc/ http://localhost:8000/oidc/callback/ + +``oidc-register`` outputs to ``client_secrets.json``. Export the client ID as ``OIDC_RP_CLIENT_ID`` and the secret as ``OIDC_RP_CLIENT_SECRET`` + + export OIDC_RP_CLIENT_ID= + export OIDC_RP_CLIENT_SECRET= To run on http://127.0.0.1:8000/ : @@ -25,6 +35,9 @@ Don't forget to start the mail server: The ``t`` command is a very short shell script that runs the tests with the correct settings and reports on coverage. +To run it: + ./t + To run the integration tests:: ./manage.py test -v 2 -p integration_test*.py --settings=happinesspackets.settings.tsting From ab867c30b575704dd7817f0bde6f38d156781f54 Mon Sep 17 00:00:00 2001 From: echoduck Date: Oct 24 2018 11:57:44 +0000 Subject: [PATCH 3/4] Fixed formatting README --- diff --git a/README.md b/README.md index 53bba5d..cde2632 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ the correct ``DJANGO_SETTINGS_MODULE``, for example with:: export DJANGO_SETTINGS_MODULE=happinesspackets.settings.dev Before running the server locally, you must collect all the static files and perform a database migration. + ./manage.py collectstatic python manage.py migrate From 06c1c910cc7fef318ab8612de694ad2ccdcce1c0 Mon Sep 17 00:00:00 2001 From: echoduck Date: Oct 24 2018 12:01:49 +0000 Subject: [PATCH 4/4] Added client_secrets.json to .gitignore --- diff --git a/.gitignore b/.gitignore index e2ced61..f7fcd3f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ syntax: glob *.pyc *.swp *.sqlite3 + + +#OIDC credentials +client_secrets.json