[1] Refine; [2] Added README
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block page_title %}Welcome to Flask Example{% endblock %}
|
||||
{% block page_title %}Welcome{% endblock %}
|
||||
{% block body %}
|
||||
{{ super() }}
|
||||
|
||||
<p>In this example, we cover concepts including: </p>
|
||||
<p>template (inheritance), URL building, redirecting, error handeling, session management (authentication), etc.</p>
|
||||
<p>This is a minimal web app developed in <a href="http://flask.pocoo.org/">Flask</a>.</p>
|
||||
<p>The main purpose is to introduce how to implement the essentail elements in web applications with Flask framework, including</p>
|
||||
<ul>
|
||||
<li>URL Building</li>
|
||||
<li>Authentication with Sessions</li>
|
||||
<li>Template & Template Inheritance</li>
|
||||
<li>Error Handling</li>
|
||||
<li>Integrating with Bootstrap</li>
|
||||
<li>Interaction with Database (SQLite)</li>
|
||||
</ul>
|
||||
|
||||
<p>For more basic knowledge of Flask, you can refer to <a href="https://www.tutorialspoint.com/flask/">a tutorial on Tutorialspoint</a>.</p>
|
||||
{% endblock %}
|
||||
@@ -50,13 +50,13 @@
|
||||
|
||||
<div class='container'>
|
||||
<hr>
|
||||
Developed by <a href='https://github.com/XD-DENG'>XD-DENG</a>
|
||||
<a href="http://flask.pocoo.org/"><img
|
||||
src="{{ url_for('static', filename='img/flask-powered.png') }}"
|
||||
border="0"
|
||||
align="right"
|
||||
alt="Flask powered"
|
||||
title="Flask powered"></a>
|
||||
|
||||
Developed by <a href='https://github.com/XD-DENG'>XD-DENG</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
{% block page_title %}Private Page{% endblock %}
|
||||
{% block body %}
|
||||
{{ super() }}
|
||||
<img src="{{ url_for('static', filename='img/private.jpg') }}" class="img-circle" alt="Cinque Terre" width="304" height="236">
|
||||
Only logged-in users, like you, can access this page.
|
||||
{% endblock %}
|
||||
@@ -2,5 +2,6 @@
|
||||
{% block page_title %}Public Page{% endblock %}
|
||||
{% block body %}
|
||||
{{ super() }}
|
||||
<img src="{{ url_for('static', filename='img/public.jpg') }}" class="img-circle" alt="Cinque Terre" width="304" height="236">
|
||||
You can access this no matter whether you have logged in.
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user