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()
|
||||
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.mailinglist import mailinglist
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{% block head %}
|
||||
{{ super() }}
|
||||
<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; }
|
||||
</style>
|
||||
<link href="{{ tweets.feed_url }}" rel="alternate" title="Flask on Twitter" type="application/atom+xml">
|
||||
|
|
@ -14,7 +14,8 @@
|
|||
{% block body %}
|
||||
<blockquote>
|
||||
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>
|
||||
<h2>Flask is Fun</h2>
|
||||
<pre><span class=ig>from flask import Flask
|
||||
|
|
@ -33,20 +34,24 @@ def hello():
|
|||
<h2>Interested?</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href=docs/>Read the documentation</a> or download as
|
||||
<a href=docs/flask-docs.pdf>PDF</a> and
|
||||
<a href=docs/flask-docs.zip>zipped HTML</a>
|
||||
<li><a href=mailinglist/>Join the mailinglist</a>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<h2>What’s in the Box?</h2>
|
||||
<ul>
|
||||
<li>built in development server and <a href=docs/quickstart/#debug-mode>debugger</a>
|
||||
<li>integrated support for <a href=docs/testing/>unittesting support</a>
|
||||
<li>RESTful <a href=docs/quickstart/#routing>request dispatching</a>
|
||||
<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>
|
||||
<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>Unicode based
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
{% endblock %}
|
||||
<p class=nav>
|
||||
<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('snippets.index') }}">snippets</a> //
|
||||
<a href="{{ url_for('extensions.index') }}">extensions</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue