forked from orbit-oss/flask
Initial checkin of stuff that exists so far.
This commit is contained in:
commit
33850c0ebd
15 changed files with 984 additions and 0 deletions
12
examples/apishowcase/templates/counter.html
Normal file
12
examples/apishowcase/templates/counter.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<p>
|
||||
This is an example application that shows how
|
||||
the Werkzeug powered Flask microframework works.
|
||||
<p>
|
||||
The various parts of the example application:
|
||||
<ul>
|
||||
<li><a href="{{ url_for('hello_user') }}">Hello World</a>
|
||||
<li><a href="{{ url_for('counter') }}">Counter</a>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
13
examples/apishowcase/templates/hello.html
Normal file
13
examples/apishowcase/templates/hello.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if name %}
|
||||
<h2>Hello {{ name }}!</h2>
|
||||
{% else %}
|
||||
<h3>Hello Stranger …</h3>
|
||||
<form action="{{ url_for('hello_user') }}" method="post">
|
||||
<p>… What's your name?
|
||||
<p><input type=text name=name size=30>
|
||||
<input type=submit value="That's me">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
11
examples/apishowcase/templates/index.html
Normal file
11
examples/apishowcase/templates/index.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<p>
|
||||
This is an example application that shows how
|
||||
the Werkzeug powered Flask microframework works.
|
||||
<p>
|
||||
The various parts of the example application:
|
||||
<ul>
|
||||
<li><a href="{{ url_for('hello_user') }}">Hello World</a>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
8
examples/apishowcase/templates/layout.html
Normal file
8
examples/apishowcase/templates/layout.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<title>Flask API Showcase</title>
|
||||
<link rel=stylesheet href="{{ url_for('static', filename='style.css') }}" type=text/css>
|
||||
<h1>Flask API Showcase</h1>
|
||||
{% if request.endpoint != 'index' %}
|
||||
<div class=backlink><a href="{{ url_for('index') }}">« back to index</a></div>
|
||||
{% endif %}
|
||||
{% block body %}{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue