From 3fd92689d9351a3f2eddbeedb13b79526bf9f5ad Mon Sep 17 00:00:00 2001 From: Seligmann Date: Sat, 26 Mar 2022 19:21:22 -0500 Subject: [PATCH] added templates --- flash_auth_app/project/db.sqlite | Bin 12288 -> 12288 bytes flash_auth_app/project/main.py | 2 +- flash_auth_app/project/templates/base.html | 67 +++++++++++++++--- flash_auth_app/project/templates/index.html | 12 +++- flash_auth_app/project/templates/login.html | 38 ++++++++++ flash_auth_app/project/templates/profile.html | 9 +++ flash_auth_app/project/templates/signup.html | 39 ++++++++++ 7 files changed, 155 insertions(+), 12 deletions(-) diff --git a/flash_auth_app/project/db.sqlite b/flash_auth_app/project/db.sqlite index 63cb53e18e978f3edcb63ef58ed2d5d6e4258b10..00d5ba9e89b5e117c926d02e6b41b8e232e1af2b 100644 GIT binary patch delta 343 zcmZwDPfEi;6vy#N0!7_SE4Wf{6X-5X=Km}Ni*#ibl!7iZndF&b+7ydmy0GyEdIv8c zJ%JbK89a(9u0(m8-|qY2HA$1a9(uvs(U})~B=2~~#~9%T<8`ka;8o>!Q2*uRz}D62 z-PBIX$W_xtVX2Ve{iwXYnGN##{AwxZk2Xw+je!HDoW@cTZgebT4j_~=xk;r3Aqdx+ zIAb%#UB(m`#UxELK_uvbmI<)m%T{s1m7lq}}viQSH2IT}|X zQPfDH6*nL=Dg*-&6HwsV(?BdRr(1z(D!~lz&{R#yFbGJf#2g7Wb^<4 delta 43 qcmZojXh@hK&B!=W#+i|EW5N=CCI*4cf(m>2CpOr!aWMb^oC^Q~DGO2n diff --git a/flash_auth_app/project/main.py b/flash_auth_app/project/main.py index 99c6ad9..44550d8 100644 --- a/flash_auth_app/project/main.py +++ b/flash_auth_app/project/main.py @@ -1,4 +1,4 @@ -from flask import Blueprint +from flask import Blueprint, render_template from flask_login import login_required, current_user from . import db diff --git a/flash_auth_app/project/templates/base.html b/flash_auth_app/project/templates/base.html index ebaf822..a7dd794 100644 --- a/flash_auth_app/project/templates/base.html +++ b/flash_auth_app/project/templates/base.html @@ -1,10 +1,59 @@ + + - - - - Runnerspace - - - - - + + + + + + + Flask Auth Example + + + + +
+ +
+ +
+ +
+
+ {% block content %} + {% endblock %} +
+
+
+ + + \ No newline at end of file diff --git a/flash_auth_app/project/templates/index.html b/flash_auth_app/project/templates/index.html index 357a399..d85cab5 100644 --- a/flash_auth_app/project/templates/index.html +++ b/flash_auth_app/project/templates/index.html @@ -1,4 +1,12 @@ -{% extends 'base.html' %} + + +{% extends "base.html" %} {% block content %} -{% endblock %} +

+ Flask Login Example +

+

+ Easy authentication and authorization in Flask. +

+{% endblock %} \ No newline at end of file diff --git a/flash_auth_app/project/templates/login.html b/flash_auth_app/project/templates/login.html index e69de29..56fc88c 100644 --- a/flash_auth_app/project/templates/login.html +++ b/flash_auth_app/project/templates/login.html @@ -0,0 +1,38 @@ + + +{% extends "base.html" %} + +{% block content %} +
+

Login

+
+ {% with messages = get_flashed_messages() %} + {% if messages %} +
+ {{ messages[0] }} +
+ {% endif %} + {% endwith %} +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+{% endblock %} \ No newline at end of file diff --git a/flash_auth_app/project/templates/profile.html b/flash_auth_app/project/templates/profile.html index e69de29..abc62c6 100644 --- a/flash_auth_app/project/templates/profile.html +++ b/flash_auth_app/project/templates/profile.html @@ -0,0 +1,9 @@ + + +{% extends "base.html" %} + +{% block content %} +

+ Welcome, {{ name }}! +

+{% endblock %} \ No newline at end of file diff --git a/flash_auth_app/project/templates/signup.html b/flash_auth_app/project/templates/signup.html index e69de29..b449fbe 100644 --- a/flash_auth_app/project/templates/signup.html +++ b/flash_auth_app/project/templates/signup.html @@ -0,0 +1,39 @@ + + +{% extends "base.html" %} + +{% block content %} +
+

Sign Up

+
+ {% with messages = get_flashed_messages() %} + {% if messages %} +
+ {{ messages[0] }}. Go to login page. +
+ {% endif %} + {% endwith %} +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+{% endblock %} \ No newline at end of file