From 121f69a5e24e4e7614e012f84647b5e2dc235906 Mon Sep 17 00:00:00 2001 From: Nicholas Funnell Date: Mon, 6 Apr 2020 20:13:48 -0700 Subject: [PATCH 1/3] use call not voice --- verify/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verify/auth.py b/verify/auth.py index f925d29..9e4d546 100644 --- a/verify/auth.py +++ b/verify/auth.py @@ -29,7 +29,7 @@ def wrapped_view(**kwargs): def start_verification(to, channel='sms'): - if channel not in ('sms', 'voice'): + if channel not in ('sms', 'call'): channel = 'sms' service = app.config.get("VERIFICATION_SID") From d48e87112d6e69cf9aeeb84ab85b25b9ffa07750 Mon Sep 17 00:00:00 2001 From: Nicholas Funnell Date: Mon, 6 Apr 2020 20:25:43 -0700 Subject: [PATCH 2/3] send it in the template too --- verify/templates/auth/register.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/verify/templates/auth/register.html b/verify/templates/auth/register.html index cab524e..8911cf7 100644 --- a/verify/templates/auth/register.html +++ b/verify/templates/auth/register.html @@ -1,14 +1,14 @@ -{% extends 'base.html' %} +{% extends 'base.html' %} {% block head %} {{ super() }} -{% endblock %} +{% endblock %} {% block header %}

{% block title %}Register{% endblock %}

-{% endblock %} +{% endblock %} {% block content %}
@@ -19,7 +19,7 @@

{% block title %}Register{% endblock %}

- +
From 1b585e9e25d1c6fc0aeac418c7ee197d09aa437f Mon Sep 17 00:00:00 2001 From: bharatmurali Date: Fri, 8 May 2020 10:36:49 -0700 Subject: [PATCH 3/3] updates to README and added Makefile --- Makefile | 14 ++++++++++++++ README.md | 20 ++------------------ 2 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d845466 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +UNAME := $(shell uname) +install: +ifeq ($(UNAME), Windows) + py -3 -m venv venv; venv\Scripts\activate.bat; +else + virtualenv venv; source ./venv/bin/activate; +endif + pip3 install -r requirements.txt + +serve-setup: + flask init-db; flask run; +open-browser: + python3 -m webbrowser "http://127.0.0.1:5000"; +serve: open-browser serve-setup diff --git a/README.md b/README.md index 833305e..73b358d 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,7 @@ Simple phone verification with Python, Flask, and Twilio Verify. ## Install ``` - python3 -m venv venv - . venv/bin/activate - ``` - -Or on Windows cmd: - - ``` - py -3 -m venv venv - venv\Scripts\activate.bat - ``` - -Install the dependencies: - - ``` - pip install -r requirements.txt + make install ``` Copy `.env.example` to `.env` to setup you environment. @@ -44,10 +30,8 @@ For the `VERIFICATION_SID` variable you'll need to provision a [Verification Service](https://www.twilio.com/console/verify/services). ## Run - ``` - flask init-db - flask run + make serve ``` Open [http://127.0.0.1:5000](http://127.0.0.1:5000) in a browser.