Setting up the environment for the tutorial is rather complex, but
here are some notes.
There is a new and an old version of the tutorial available -
be sure you are using the proper notes
old version has a DB, but is not really effective
new version is embedded in the larger flask download
(github), and does use a sqlite DB, WITH encrypted passwords
(functionality from werkzeug.security)
There are a lot of files that depend on each other and on
their correct locations in the flaskr directory structure, and
use the default file structure of the Flask constructor:
repeat 6 for other pages, in my case: /b and /table
base.html, adding - YOUR links should link to YOUR pages, of
course:
Links to our pages:
<ul>
<li><a
href='/'>Home</a>
<li><a href='/a'>page
a</a>
<li><a href='/b'>page
b</a>
<li><a
href='/table'>table</a>
</ul>
<hr>
{% block content %}{% endblock %}
{% if time %}
<hr>Time: {{ time }}
{% endif %}
Run flask and check to find files using:
flask run
If you want to use the login system already present in flaskr,
add the following:
from flaskr.auth import login_required
@bp.route ("/table")
@login_required