From e3d96644c7811a59893fb76f3bc8658983f791fc Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 10:51:04 +0000 Subject: [PATCH 01/13] Attempts at fixing the deploy - but it seems PR 33 will fix it anyway. --- .travis.yml | 2 -- Gemfile | 1 - Gemfile.lock | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3df136908..b209924da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,6 @@ addons: postgresql: '9.3' env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= -before_install: -- rvm install 2.0.0 install: - bundle install - pip install -r requirements_for_test.txt diff --git a/Gemfile b/Gemfile index 73901a698..e46ea120f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,2 @@ source 'https://rubygems.org' -ruby '2.0.0' gem 'sass' diff --git a/Gemfile.lock b/Gemfile.lock index 3c5e06876..ccb6dcb78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,4 +10,4 @@ DEPENDENCIES sass BUNDLED WITH - 1.10.6 \ No newline at end of file + 1.11.2 From 8c72166ebe26b49f1a905c4482f82da8206e1d63 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:04:29 +0000 Subject: [PATCH 02/13] Bah! Another attempt. --- .travis.yml | 2 ++ Gemfile | 1 + 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index b209924da..3df136908 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ addons: postgresql: '9.3' env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= +before_install: +- rvm install 2.0.0 install: - bundle install - pip install -r requirements_for_test.txt diff --git a/Gemfile b/Gemfile index e46ea120f..73901a698 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ source 'https://rubygems.org' +ruby '2.0.0' gem 'sass' From 4cb2310359959edab2eb314a770b5bc94450ba70 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:22:03 +0000 Subject: [PATCH 03/13] Use version 2.0.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3df136908..dfec58e9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ env: before_install: - rvm install 2.0.0 install: -- bundle install +- bundle install 2.0.0 - pip install -r requirements_for_test.txt before_script: - psql -c 'create database test_notifications_admin;' -U postgres From c691becba275ef0644e5b8f9b90f1d312545ab5b Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:28:57 +0000 Subject: [PATCH 04/13] Trying version 1.9.3 --- .travis.yml | 4 ++-- Gemfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index dfec58e9f..2a31438a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,9 @@ addons: env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= before_install: -- rvm install 2.0.0 +- rvm install 1.9.3 install: -- bundle install 2.0.0 +- bundle install - pip install -r requirements_for_test.txt before_script: - psql -c 'create database test_notifications_admin;' -U postgres diff --git a/Gemfile b/Gemfile index 73901a698..c371beea0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -ruby '2.0.0' +ruby '1.9.3' gem 'sass' From eab451a38b68563c43753e35477453de930c6756 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:39:54 +0000 Subject: [PATCH 05/13] Removing ruby versions --- .travis.yml | 2 -- Gemfile | 1 - 2 files changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a31438a7..b209924da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,6 @@ addons: postgresql: '9.3' env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= -before_install: -- rvm install 1.9.3 install: - bundle install - pip install -r requirements_for_test.txt diff --git a/Gemfile b/Gemfile index c371beea0..e46ea120f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,2 @@ source 'https://rubygems.org' -ruby '1.9.3' gem 'sass' From ea9187a7ec8d776a249b7e5620f1b86427eb2966 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:48:24 +0000 Subject: [PATCH 06/13] Removing the aws deployment commands until aws is running again --- .travis.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index b209924da..24b59df39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,27 +28,3 @@ deploy: repo: alphagov/notifications-admin run: - python app.py db upgrade -- provider: s3 - access_key_id: AKIAI37IS2VAC5PJHHDA - secret_access_key: &1 - secure: FZ0OcAyYPY8kyMB+JwdV1XBz9gT0uThGmdti4oR72cdnpoIMbPfwTmkIiRu2tlW8OplS+RnuivFDxBXOdaQUkcOSTZZAywdROVdNSf98XfiWmWopH+FZtp3cCu+tWgePseVUBBEIfQ0gPdZaflh/c4Yw2888MaUKOOMuqYb9CuEvDtzbFJ3fs6lstK2dveE9pHgVFkQgppLohDGaWFEEXG+fngYqPukK4pvoA8LD7TWW9kTbK8HEG56kvVLxrU7HWisCxHjwB761Zenbq3AiWcVtNaD8DfMzEM/1jKliWjjyAdyAH3EkSti0HJnM4b5L9ewIukt/yr3xtH4Hz0xHgQ+nzk0g81+OB1lQSRl63aNk6sExknsUbKPDCoUOYbmp6FXEohN42EJTywMUfsaDgvdcH71MCcIV+z/YIUoI1RfMEGK4jYDYH6j1477BvhxuywD7CSvHRsjLyT4xmFGxlbg7E02TrMUe7Fon2uPa3Olf/vmbkyhur4tTYEwYwQhIk/txVXazh3QFQx3jrtPaisvuf6cjyCCH92LoKYj/JQ9EZaBZjjbfNF4N8b+WNDPGkLPWWtFTkkDkXgFs72pX8NSJiCbq2kdLo0zV0J8cQlgiRuMGHQQE6t5MnoT/UaUPhSMajcIgh6RZDT9wcU4svs8wfVdOnMeN2ClnARa26Kw= - local_dir: dpl_cd_upload - skip_cleanup: true - on: &2 - repo: alphagov/notifications-admin - bucket: notifications-admin-codedeploy - region: eu-west-1 -- provider: codedeploy - access_key_id: AKIAI37IS2VAC5PJHHDA - secret_access_key: *1 - bucket: notifications-admin-codedeploy - key: notifications-admin.zip - bundle_type: zip - application: notifications-admin - deployment_group: notifications_admin_deployment_group - region: eu-west-1 - on: *2 -before_deploy: -- zip -r notifications-admin * -- mkdir -p dpl_cd_upload -- mv notifications-admin.zip dpl_cd_upload/notifications-admin.zip \ No newline at end of file From 41b59fdebe1216d60ef360aba68c811405c5e8cd Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:53:09 +0000 Subject: [PATCH 07/13] Remove bundle install --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 24b59df39..1e64d7b4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ addons: env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= install: -- bundle install - pip install -r requirements_for_test.txt before_script: - psql -c 'create database test_notifications_admin;' -U postgres From 0eabdc06befe5e70efb7deccdbf5606c3e21d17f Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 11:59:25 +0000 Subject: [PATCH 08/13] try again --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1e64d7b4a..24b59df39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ addons: env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= install: +- bundle install - pip install -r requirements_for_test.txt before_script: - psql -c 'create database test_notifications_admin;' -U postgres From 3d437ba65388266bd85dc42e24382ff88d1d2607 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 12:01:11 +0000 Subject: [PATCH 09/13] revert bundle version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ccb6dcb78..bb229915d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,4 +10,4 @@ DEPENDENCIES sass BUNDLED WITH - 1.11.2 + 1.10.6 From 931c6b2809de22b7c74206256ecfd1c5beaee149 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 12:35:36 +0000 Subject: [PATCH 10/13] Add debugging to find issue. --- app/main/views/two_factor.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/main/views/two_factor.py b/app/main/views/two_factor.py index b06bb2029..b1efa4545 100644 --- a/app/main/views/two_factor.py +++ b/app/main/views/two_factor.py @@ -1,3 +1,5 @@ +import traceback + from flask import render_template, redirect, jsonify, session from flask_login import login_user @@ -13,12 +15,15 @@ def render_two_factor(): @main.route('/two-factor', methods=['POST']) def process_two_factor(): - form = TwoFactorForm() + try: + form = TwoFactorForm() - if form.validate_on_submit(): - user = users_dao.get_user_by_id(session['user_id']) - verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms') - login_user(user) - return redirect('/dashboard') - else: - return jsonify(form.errors), 400 + if form.validate_on_submit(): + user = users_dao.get_user_by_id(session['user_id']) + verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms') + login_user(user) + return redirect('/dashboard') + else: + return jsonify(form.errors), 400 + except: + traceback.print_exc() \ No newline at end of file From 1fd6ce9fe407b253ddccc97b3fe6c249eced4e13 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 12:40:01 +0000 Subject: [PATCH 11/13] fix codestyle --- app/main/views/two_factor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/views/two_factor.py b/app/main/views/two_factor.py index b1efa4545..a9f681947 100644 --- a/app/main/views/two_factor.py +++ b/app/main/views/two_factor.py @@ -26,4 +26,4 @@ def process_two_factor(): else: return jsonify(form.errors), 400 except: - traceback.print_exc() \ No newline at end of file + traceback.print_exc() From f1291b7c09eead6daf9d0c9a1d134e86b62d9c66 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 13:13:06 +0000 Subject: [PATCH 12/13] Adding logging. Raise ValidationError for validate_codes rather than returning a true or false. --- app/main/forms.py | 16 ++++++---------- app/main/views/verify.py | 25 +++++++++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 28238e74e..324f1de42 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -95,18 +95,14 @@ class AddServiceForm(Form): def validate_codes(field, code_type): codes = verify_codes_dao.get_codes(user_id=session['user_id'], code_type=code_type) - is_valid = len([code for code in codes if validate_code(field, code)]) == 1 - if is_valid: - field.errors.clear() - return is_valid + print('validate_codes for user_id: {} are {}'.format(session['user_id'], codes)) + if not [code for code in codes if validate_code(field, code)]: + raise ValidationError('Code does not match') def validate_code(field, code): if field.data and check_hash(field.data, code.code): if code.expiry_datetime <= datetime.now(): - field.errors.append('Code has expired') - return False - return True - else: - field.errors.append('Code does not match') - return False + raise ValidationError('Code has expired') + else: + return code.code diff --git a/app/main/views/verify.py b/app/main/views/verify.py index 96ae0cb76..486b456c8 100644 --- a/app/main/views/verify.py +++ b/app/main/views/verify.py @@ -1,3 +1,5 @@ +import traceback + from flask import render_template, redirect, jsonify, session from flask_login import login_user @@ -13,13 +15,16 @@ def render_verify(): @main.route('/verify', methods=['POST']) def process_verify(): - form = VerifyForm() - if form.validate_on_submit(): - user = users_dao.get_user_by_id(session['user_id']) - verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='email') - verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms') - users_dao.activate_user(user.id) - login_user(user) - return redirect('/add-service') - else: - return jsonify(form.errors), 400 + try: + form = VerifyForm() + if form.validate_on_submit(): + user = users_dao.get_user_by_id(session['user_id']) + verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='email') + verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms') + users_dao.activate_user(user.id) + login_user(user) + return redirect('/add-service') + else: + return jsonify(form.errors), 400 + except: + traceback.print_exc() From e1c2ba034db19ca1af52188fc19108ca6c13624c Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 5 Jan 2016 13:17:01 +0000 Subject: [PATCH 13/13] Turn on debug for live --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 268746726..8a9e5745a 100644 --- a/config.py +++ b/config.py @@ -38,7 +38,7 @@ class Test(Config): class Live(Config): - DEBUG = False + DEBUG = True HTTP_PROTOCOL = 'https' configs = {