From d93e9106d4b71204e7c4010e7bc054616aba39b8 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 19 Jun 2022 16:59:27 -0400 Subject: [PATCH] Verification challenge code refactor it works good enough, future commits will do some refactors to make the success screen more user friendly. modified: Makefile modified: README.rst modified: index.html modified: remarkbox/lib/mail.py modified: remarkbox/lib/mail_messages.py modified: remarkbox/models/meta.py modified: remarkbox/models/user.py modified: remarkbox/routes.py modified: remarkbox/templates/join-or-log-in.j2 modified: remarkbox/templates/show-node.j2 new file: remarkbox/templates/verification-challenge.j2 modified: remarkbox/tests/test_models.py modified: remarkbox/tests/test_views.py modified: remarkbox/views/__init__.py modified: remarkbox/views/authentication.py --- Makefile | 1 + README.rst | 16 +- index.html | 2 +- remarkbox/lib/mail.py | 35 ++--- remarkbox/lib/mail_messages.py | 44 ++---- remarkbox/models/meta.py | 4 + remarkbox/models/user.py | 29 +++- remarkbox/routes.py | 2 + remarkbox/templates/join-or-log-in.j2 | 3 - remarkbox/templates/show-node.j2 | 2 +- remarkbox/templates/verification-challenge.j2 | 39 +++++ remarkbox/tests/test_models.py | 2 +- remarkbox/tests/test_views.py | 14 +- remarkbox/views/__init__.py | 11 +- remarkbox/views/authentication.py | 142 +++++++++++++++--- 15 files changed, 246 insertions(+), 100 deletions(-) create mode 100644 remarkbox/templates/verification-challenge.j2 diff --git a/Makefile b/Makefile index a7dc920..3d40460 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ clean: test: dev env/bin/py.test + #env/bin/py.test --lf serve: dev # In the first shell, run a copy of remarkbox using: diff --git a/README.rst b/README.rst index 484f9ce..abdd31e 100644 --- a/README.rst +++ b/README.rst @@ -94,17 +94,27 @@ Now browse to http://127.0.0.1:8000 and index.html will load and will have an em If you attempt to log in, your third shell will capture the email and you can copy / paste the verification link to log in! - -SQL Migrations -=============== +New Environments +================ If your deployment is brand new, you don't need to run any migrations. + +To create all the schemas & tables in your database, run: + +.. code-block:: bash + + env/bin/remarkbox_init_db development.ini + You should however run this to stamp the database as ready: .. code-block:: bash alembic -c development.ini stamp head + +SQL Migrations +=============== + Otherwise, it should be safe to run this at anytime to catch your database up: .. code-block:: bash diff --git a/index.html b/index.html index 260abe9..d413a4b 100644 --- a/index.html +++ b/index.html @@ -52,7 +52,7 @@ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem