Adds in blueprints and an application factory
This commit is contained in:
parent
de555c82ce
commit
8cf32bca51
10 changed files with 95 additions and 62 deletions
|
|
@ -5,9 +5,9 @@
|
|||
<h1>Flaskr</h1>
|
||||
<div class="metanav">
|
||||
{% if not session.logged_in %}
|
||||
<a href="{{ url_for('login') }}">log in</a>
|
||||
<a href="{{ url_for('flaskr.login') }}">log in</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('logout') }}">log out</a>
|
||||
<a href="{{ url_for('flaskr.logout') }}">log out</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for message in get_flashed_messages() %}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{% block body %}
|
||||
<h2>Login</h2>
|
||||
{% if error %}<p class="error"><strong>Error:</strong> {{ error }}{% endif %}
|
||||
<form action="{{ url_for('login') }}" method="post">
|
||||
<form action="{{ url_for('flaskr.login') }}" method="post">
|
||||
<dl>
|
||||
<dt>Username:
|
||||
<dd><input type="text" name="username">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if session.logged_in %}
|
||||
<form action="{{ url_for('add_entry') }}" method="post" class="add-entry">
|
||||
<form action="{{ url_for('flaskr.add_entry') }}" method="post" class="add-entry">
|
||||
<dl>
|
||||
<dt>Title:
|
||||
<dd><input type="text" size="30" name="title">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue