This exercise uses your programming environment to enhance the Web site you created last week with additional functionality to include images, tables and a Form using Python flask. Specifically, you will add two (2) additional routes allowing a user to register and login to a web site. Additional security considerations include other routes (beyond the register route) will not be accessible until a successful login

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

This exercise uses your programming environment to enhance the Web site you created last week with additional functionality to include images, tables and a Form using Python flask. Specifically, you will add two (2) additional routes allowing a user to register and login to a web site. Additional security considerations include other routes (beyond the register route) will not be accessible until a successful login has occurred

In addition to the requirements list above the following functionality should be found within your web site on one or more web pages.

 A user registration form

 A user login form

 A password complexity should be enforced to include at least 12 characters in length, and include at least 1 uppercase character, 1 lowercase character, 1 number and 1 special character.

Below I have attached my python code as well as my home page html code. I need assistance creating the registration form and login form and implementing in both an html form and putting into my current python code. Thanks in advance.

app.py

"""Program to generate a simple website using Python flask.
Includes at least 3 routes using render_template() functionality."""
from datetime import date
from datetime import datetime
from flask import Flask, render_template
app = Flask(__name__,template_folder='templates')
now = datetime.now()
current_time = now.strftime("%H:%M")
@app.route('/')
@app.route('/home_page.html')
def home():
  """Render the home page for the website"""
  return render_template('home_page.html', date = date.today(), time = current_time )
@app.route('/ariana_grande.html')
def page1():
  """Render the Ariana Grande page for the website"""
  return render_template('ariana_grande.html', date = date.today(), time = current_time )
@app.route('/ava_max.html')
def page2():
  """Render the Ava Max page for the website"""
  return render_template('ava_max.html', date = date.today(), time = current_time )
@app.route('/dua_lipa.html')
def page3():
  """"Render the Dua Lipa page for the website"""
  return render_template('dua_lipa.html', date = date.today(), time = current_time )
if __name__=='__main__':
app.run(debug=True)

home_page.html

<html>
<head>
<title>Home Page</title>
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='styles/style.css') }}">
</head>
<body>
<h1 style="color:red;">Home Page</h1>
<h2>Our Favorite Artists</h2>
<div class="separate">
<!--Ordered list-->
<ol>
<li>Ariana Grande</li>
<li>Ava Max</li>
<li>Dua Lipa</li>
</ol>
</div>
<h2>What you'll find on their page:</h2>
<div class="separate">
<!--Unordered list-->
<ul>
<li>Artist names and age</li>
<li>Fun facts about the group/artist</li>
<li>Links to their official page, Wikipedia, and social media page</li>
</ul>
</div>
<!--Display the date and time passed from python-->
<p>You visited this page on {{date}} at {{time}}</p>
<br>
<h3>Menu</h3>
<!--Menu to navigate to different pages-->
<a href="/ariana_grande.html">Ariana Grande</a>
<br>
<a href="/ava_max.html">Ava Max</a>
<br>
<a href="/dua_lipa.html">Dua Lipa</a>
</body>
</html>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY