2010-04-21 17:44:16 +02:00
|
|
|
|
{% extends "layout.html" %}
|
2010-05-18 17:56:51 +02:00
|
|
|
|
{% from "_twitter.html" import tweet_box %}
|
|
|
|
|
|
{% set latest_version = '0.2' %}
|
|
|
|
|
|
{% set download_url = 'http://pypi.python.org/packages/source/' ~
|
|
|
|
|
|
'F/Flask/Flask-' ~ latest_version ~ '.tar.gz' %}
|
2010-04-21 17:44:16 +02:00
|
|
|
|
{% block head %}
|
|
|
|
|
|
{{ super() }}
|
|
|
|
|
|
<style type=text/css>
|
2010-05-16 15:02:09 +02:00
|
|
|
|
h1 { margin: 0 0 30px 0; background: url({{ url_for('.static', filename='logo.png') }}) no-repeat center; height: 165px; }
|
2010-04-21 17:44:16 +02:00
|
|
|
|
h1 span, p.tagline { display: none; }
|
|
|
|
|
|
</style>
|
|
|
|
|
|
{% endblock %}
|
2010-05-02 16:34:12 +02:00
|
|
|
|
{% block body_title %}
|
|
|
|
|
|
{{ super() }}
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<p class=tagline>because sometimes a pocket knife is not enough
|
2010-05-02 16:34:12 +02:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block body %}
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<blockquote>
|
|
|
|
|
|
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.
|
2010-05-16 15:02:09 +02:00
|
|
|
|
And before you ask: It's <a href="{{ url_for('docs.show', page='license')
|
|
|
|
|
|
}}">BSD licensed</a>!
|
2010-04-16 14:17:24 +02:00
|
|
|
|
</blockquote>
|
2010-05-18 17:56:51 +02:00
|
|
|
|
<p class=latestver>
|
|
|
|
|
|
<strong>Latest Version:</strong>
|
|
|
|
|
|
<a href="{{ download_url }}" title="Download tarball">{{ latest_version }}</a>
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<h2>Flask is Fun</h2>
|
|
|
|
|
|
<pre><span class=ig>from flask import Flask
|
|
|
|
|
|
app = Flask(__name__)</span>
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/")
|
|
|
|
|
|
def hello():
|
|
|
|
|
|
return "Hello World!"
|
|
|
|
|
|
|
|
|
|
|
|
<span class=ig>if __name__ == "__main__":
|
|
|
|
|
|
app.run()</span></pre>
|
|
|
|
|
|
<h2>And Easy to Setup</h2>
|
|
|
|
|
|
<pre><span class=ig>$ </span>easy_install Flask
|
|
|
|
|
|
<span class=ig>$ </span>python hello.py
|
2010-04-17 20:52:37 +02:00
|
|
|
|
<span class=ig> * Running on http://localhost:5000/</span></pre>
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<h2>Interested?</h2>
|
|
|
|
|
|
<ul>
|
2010-05-18 17:56:51 +02:00
|
|
|
|
<li><a href="{{ download_url }}">Download latest release</a> ({{ latest_version }})
|
2010-04-25 17:12:57 +02:00
|
|
|
|
<li>
|
2010-05-16 15:02:09 +02:00
|
|
|
|
<a href="{{ url_for('docs.index') }}">Read the documentation</a> or download as
|
|
|
|
|
|
<a href="{{ url_for('docs.pdf') }}">PDF</a> and
|
|
|
|
|
|
<a href="{{ url_for('docs.zip') }}">zipped HTML</a>
|
|
|
|
|
|
<li><a href="{{ url_for('mailinglist.index') }}">Join the mailinglist</a>
|
2010-04-16 14:33:12 +02:00
|
|
|
|
<li><a href=http://github.com/mitsuhiko/flask>Fork it on github</a>
|
2010-04-16 14:17:24 +02:00
|
|
|
|
</ul>
|
2010-04-17 20:52:37 +02:00
|
|
|
|
<h2>What’s in the Box?</h2>
|
|
|
|
|
|
<ul>
|
2010-05-16 15:02:09 +02:00
|
|
|
|
<li>built in development server and <a href="{{ url_for('docs.show',
|
|
|
|
|
|
page='quickstart') }}#debug-mode">debugger</a>
|
|
|
|
|
|
<li>integrated support for <a href="{{ url_for('docs.show',
|
|
|
|
|
|
page='testing') }}">unittesting support</a>
|
|
|
|
|
|
<li>RESTful <a href="{{ url_for('docs.show', page='quickstart')
|
|
|
|
|
|
}}#routing">request dispatching</a>
|
2010-04-17 20:52:37 +02:00
|
|
|
|
<li>uses <a href=http://jinja.pocoo.org/2/documentation/templates>Jinja2 templating</a>
|
2010-05-16 15:02:09 +02:00
|
|
|
|
<li>support for <a href="{{ url_for('docs.show', page='quickstart')
|
|
|
|
|
|
}}#sessions">secure cookies</a> (client side sessions)
|
2010-04-17 20:52:37 +02:00
|
|
|
|
<li>100% <a href=http://www.python.org/dev/peps/pep-0333/>WSGI 1.0</a> compliant
|
|
|
|
|
|
<li>Unicode based
|
2010-05-18 17:56:51 +02:00
|
|
|
|
<li>extensively <a href="{{ url_for('docs.index') }}">documented</a>
|
2010-04-17 20:52:37 +02:00
|
|
|
|
</ul>
|
|
|
|
|
|
<h2>What do Flask Apps look like?</h2>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
If you are looking for some example code of applications written with Flask,
|
|
|
|
|
|
have a look at the sources of the examples on github:
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href=http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/>flaskr</a>
|
|
|
|
|
|
— a microblog
|
|
|
|
|
|
<li><a href=http://github.com/mitsuhiko/flask/tree/master/examples/minitwit/>minitwit</a>
|
|
|
|
|
|
— a twitter clone
|
2010-04-21 18:49:42 +02:00
|
|
|
|
<li><a href=http://github.com/mitsuhiko/flask/tree/website>this website</a>
|
2010-04-21 21:09:47 +02:00
|
|
|
|
— static pages + mailinglist archives
|
2010-04-17 20:52:37 +02:00
|
|
|
|
</ul>
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<h2>Contribute</h2>
|
|
|
|
|
|
<p>Found a bug? Have a good idea for improving Flask? Head over to
|
|
|
|
|
|
<a href=http://github.com/mitsuhiko/flask>Flask's github</a> page and
|
2010-04-17 20:52:37 +02:00
|
|
|
|
create a new ticket or fork. If you just want to chat with fellow
|
2010-05-18 17:56:51 +02:00
|
|
|
|
developers, visit <a href="{{ url_for('community.irc') }}">the IRC
|
|
|
|
|
|
channel</a> or join <a href="{{ url_for('mailinglist.index') }}"
|
|
|
|
|
|
>the mailinglist</a>.
|
2010-05-16 01:06:37 +02:00
|
|
|
|
{% if tweets %}
|
|
|
|
|
|
<h2>Recent Tweets</h2>
|
2010-05-18 17:56:51 +02:00
|
|
|
|
<p>
|
|
|
|
|
|
What people say about Flask on <a href=http://twitter.com/>Twitter</a>:
|
|
|
|
|
|
{{ tweet_box(tweets, 3) }}
|
|
|
|
|
|
<p class=more><a href="{{ url_for('community.twitter') }}">more »<a>
|
2010-05-16 01:06:37 +02:00
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
2010-04-16 14:17:24 +02:00
|
|
|
|
<a href="http://github.com/mitsuhiko/flask"><img style="position: fixed; top: 0; right: 0; border: 0;"
|
|
|
|
|
|
src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
|
2010-04-21 17:44:16 +02:00
|
|
|
|
{% endblock %}
|