From 151c855de0bda135421a32b7afbdd1b0b8e5b00a Mon Sep 17 00:00:00 2001 From: feysal-Ibrahim Date: Feb 25 2019 10:49:11 +0000 Subject: [PATCH 1/3] setting up dev environment --- diff --git a/happinesspackets/settings/dev.py b/happinesspackets/settings/dev.py index a7ccc0b..9fde601 100644 --- a/happinesspackets/settings/dev.py +++ b/happinesspackets/settings/dev.py @@ -49,7 +49,11 @@ INSTALLED_APPS += ( ) SELENIUM_SCREENSHOT_DIR = PROJECT_DIR.child('selenium-screenshots') +DEBUG_TOOLBAR_CONFIG = { + 'SHOW_TOOLBAR_CALLBACK': lambda x: True +} +DEBUG_TOOLBAR_PATCH_SETTINGS = False # Uses a separate Docker container to act as the Redis server CELERY_BROKER_URL = 'redis://redis:6379/0' diff --git a/happinesspackets/urls.py b/happinesspackets/urls.py index 375f4d3..a3f4f19 100644 --- a/happinesspackets/urls.py +++ b/happinesspackets/urls.py @@ -4,11 +4,17 @@ import django from django.conf import settings from django.conf.urls import include, url from django.contrib import admin +from django.conf.urls.static import static urlpatterns = [ url(r'^oidc/', include('mozilla_django_oidc.urls')), url(r'^', include('happinesspackets.messaging.urls', namespace="messaging")), ] +if settings.DEBUG: + import debug_toolbar + urlpatterns += [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] if settings.ADMIN_ENABLED or settings.DEBUG: urlpatterns.append(url(r'^drunken-octo-lama/', include(admin.site.urls))) From d25f2b76101ffb1f7df04168bb29142613251c5e Mon Sep 17 00:00:00 2001 From: feysal-Ibrahim Date: Feb 25 2019 11:01:57 +0000 Subject: [PATCH 2/3] removed duplicate button --- diff --git a/templates/messaging/start.html b/templates/messaging/start.html index f0562c5..65df56a 100644 --- a/templates/messaging/start.html +++ b/templates/messaging/start.html @@ -18,11 +18,6 @@ you work with are happy to work with you, is an awesome feeling. With Fedora Happiness Packets, we're trying to spread that feeling.

- -

- Send some happiness now! 💌 -

-

How does it work?

Openly expressing appreciation, gratitude, or happiness to other people can be difficult. This is especially From e68be7424d9bbf09461539c23a3480c57b063f98 Mon Sep 17 00:00:00 2001 From: feysal-Ibrahim Date: Feb 25 2019 12:01:32 +0000 Subject: [PATCH 3/3] update readme file --- diff --git a/README.md b/README.md index 10a18f0..84ad9d4 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,16 @@ This project contains the codebase for fedora hosted version of happinesspackets # Setup + Make sure you have Docker and Docker Compose installed. +To run this project or the tests, you need to set up a virtualenv, install the dev requirements and set the correct DJANGO_SETTINGS_MODULE, for example with: + +* `virtualenv --no-site-packages --prompt='(fedora-happiness-packets)' virtualenv/ + source virtualenv/bin/activate pip +* pip install -r requirements/dev.txt +* export DJANGO_SETTINGS_MODULE=happinesspackets.settings.dev` + In order for the login and send views to work, you must supply an OpenID Connect Client ID and Client Secret: chmod +x generate_client_secrets.sh