Finished up URL changes
This commit is contained in:
parent
9e5de5538f
commit
57e7db8b37
3 changed files with 23 additions and 12 deletions
|
|
@ -24,7 +24,13 @@ def remove_db_session(response):
|
||||||
db_session.remove()
|
db_session.remove()
|
||||||
return response
|
return response
|
||||||
|
|
||||||
app.add_url_rule('/docs/', endpoint='documentation.index', build_only=True)
|
app.add_url_rule('/docs/', endpoint='docs.index', build_only=True)
|
||||||
|
app.add_url_rule('/docs/<path:page>/', endpoint='docs.show',
|
||||||
|
build_only=True)
|
||||||
|
app.add_url_rule('/docs/flask-docs.pdf', endpoint='docs.pdf',
|
||||||
|
build_only=True)
|
||||||
|
app.add_url_rule('/docs/flask-docs.zip', endpoint='docs.zip',
|
||||||
|
build_only=True)
|
||||||
|
|
||||||
from flask_website.views.general import general
|
from flask_website.views.general import general
|
||||||
from flask_website.views.mailinglist import mailinglist
|
from flask_website.views.mailinglist import mailinglist
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<style type=text/css>
|
<style type=text/css>
|
||||||
h1 { margin: 0 0 30px 0; background: url({{ url_for('.static', filename='login.png') }}) no-repeat center; height: 165px; }
|
h1 { margin: 0 0 30px 0; background: url({{ url_for('.static', filename='logo.png') }}) no-repeat center; height: 165px; }
|
||||||
h1 span, p.tagline { display: none; }
|
h1 span, p.tagline { display: none; }
|
||||||
</style>
|
</style>
|
||||||
<link href="{{ tweets.feed_url }}" rel="alternate" title="Flask on Twitter" type="application/atom+xml">
|
<link href="{{ tweets.feed_url }}" rel="alternate" title="Flask on Twitter" type="application/atom+xml">
|
||||||
|
|
@ -14,7 +14,8 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<blockquote>
|
<blockquote>
|
||||||
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.
|
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.
|
||||||
And before you ask: It's <a href=docs/license/>BSD licensed</a>!
|
And before you ask: It's <a href="{{ url_for('docs.show', page='license')
|
||||||
|
}}">BSD licensed</a>!
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<h2>Flask is Fun</h2>
|
<h2>Flask is Fun</h2>
|
||||||
<pre><span class=ig>from flask import Flask
|
<pre><span class=ig>from flask import Flask
|
||||||
|
|
@ -33,20 +34,24 @@ def hello():
|
||||||
<h2>Interested?</h2>
|
<h2>Interested?</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href=docs/>Read the documentation</a> or download as
|
<a href="{{ url_for('docs.index') }}">Read the documentation</a> or download as
|
||||||
<a href=docs/flask-docs.pdf>PDF</a> and
|
<a href="{{ url_for('docs.pdf') }}">PDF</a> and
|
||||||
<a href=docs/flask-docs.zip>zipped HTML</a>
|
<a href="{{ url_for('docs.zip') }}">zipped HTML</a>
|
||||||
<li><a href=mailinglist/>Join the mailinglist</a>
|
<li><a href="{{ url_for('mailinglist.index') }}">Join the mailinglist</a>
|
||||||
<li><a href=http://github.com/mitsuhiko/flask>Fork it on github</a>
|
<li><a href=http://github.com/mitsuhiko/flask>Fork it on github</a>
|
||||||
<li><a href=http://pypi.python.org/pypi/Flask>Download it from PyPI</a>
|
<li><a href=http://pypi.python.org/pypi/Flask>Download it from PyPI</a>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>What’s in the Box?</h2>
|
<h2>What’s in the Box?</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>built in development server and <a href=docs/quickstart/#debug-mode>debugger</a>
|
<li>built in development server and <a href="{{ url_for('docs.show',
|
||||||
<li>integrated support for <a href=docs/testing/>unittesting support</a>
|
page='quickstart') }}#debug-mode">debugger</a>
|
||||||
<li>RESTful <a href=docs/quickstart/#routing>request dispatching</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>
|
||||||
<li>uses <a href=http://jinja.pocoo.org/2/documentation/templates>Jinja2 templating</a>
|
<li>uses <a href=http://jinja.pocoo.org/2/documentation/templates>Jinja2 templating</a>
|
||||||
<li>support for <a href=docs/quickstart/#sessions>secure cookies</a> (client side sessions)
|
<li>support for <a href="{{ url_for('docs.show', page='quickstart')
|
||||||
|
}}#sessions">secure cookies</a> (client side sessions)
|
||||||
<li>100% <a href=http://www.python.org/dev/peps/pep-0333/>WSGI 1.0</a> compliant
|
<li>100% <a href=http://www.python.org/dev/peps/pep-0333/>WSGI 1.0</a> compliant
|
||||||
<li>Unicode based
|
<li>Unicode based
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<p class=nav>
|
<p class=nav>
|
||||||
<a href="{{ url_for('general.index') }}">overview</a> //
|
<a href="{{ url_for('general.index') }}">overview</a> //
|
||||||
<a href="{{ url_for('documentation.index') }}">documentation</a> //
|
<a href="{{ url_for('docs.index') }}">documentation</a> //
|
||||||
<a href="{{ url_for('mailinglist.index') }}">mailinglist</a> //
|
<a href="{{ url_for('mailinglist.index') }}">mailinglist</a> //
|
||||||
<a href="{{ url_for('snippets.index') }}">snippets</a> //
|
<a href="{{ url_for('snippets.index') }}">snippets</a> //
|
||||||
<a href="{{ url_for('extensions.index') }}">extensions</a>
|
<a href="{{ url_for('extensions.index') }}">extensions</a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue