Switch to url_for :)

This commit is contained in:
Armin Ronacher 2010-05-16 14:33:32 +02:00
parent 1c5db9ab80
commit 9e5de5538f
10 changed files with 11 additions and 11 deletions

View file

@ -8,7 +8,7 @@ body, html {
} }
body { body {
background: url(/static/ship.png) no-repeat center right; background: url({{ url_for('.static', filename='ship.png') }}) no-repeat center right;
} }
body:after { body:after {
@ -18,7 +18,7 @@ body:after {
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 30px; width: 30px;
background: url(/static/mask.png) repeat-y left; background: url({{ url_for('.static', filename='mask.png') }}) repeat-y left;
} }
a { color: #004B6B; } a { color: #004B6B; }

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/extensions.png); } h1 { background-image: url({{ url_for('.static', filename='extensions.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block body_title %} {% block body_title %}

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/profile.png); } h1 { background-image: url({{ url_for('.static', filename='profile.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block title %}Change OpenID{% endblock %} {% block title %}Change OpenID{% endblock %}

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/login.png); } h1 { background-image: url({{ url_for('.static', filename='login.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block title %}First Login{% endblock %} {% block title %}First Login{% endblock %}

View file

@ -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(/static/logo.png) no-repeat center; height: 165px; } h1 { margin: 0 0 30px 0; background: url({{ url_for('.static', filename='login.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">

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/login.png); } h1 { background-image: url({{ url_for('.static', filename='login.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block title %}Login{% endblock %} {% block title %}Login{% endblock %}

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/profile.png); } h1 { background-image: url({{ url_for('.static', filename='profile.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block title %}Profile{% endblock %} {% block title %}Profile{% endblock %}

View file

@ -2,7 +2,7 @@
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/mailinglist.png); } h1 { background-image: url({{ url_for('.static', filename='mailinglist.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block body_title %} {% block body_title %}

View file

@ -3,7 +3,7 @@
{{ super() }} {{ super() }}
<link href="{{ url_for('recent_feed') }}" rel="alternate" title="Recent Flask Snippets" type="application/atom+xml"> <link href="{{ url_for('recent_feed') }}" rel="alternate" title="Recent Flask Snippets" type="application/atom+xml">
<style type=text/css> <style type=text/css>
h1 { background-image: url(/static/snippets.png); } h1 { background-image: url({{ url_for('.static', filename='snippets.png') }}); }
</style> </style>
{% endblock %} {% endblock %}
{% block body_title %} {% block body_title %}

View file

@ -32,7 +32,7 @@ def logout():
def login(): def login():
if g.user is not None: if g.user is not None:
return redirect(url_for('general.index')) return redirect(url_for('general.index'))
if reassign and 'cancel' in request.form: if 'cancel' in request.form:
flash(u'Cancelled. The OpenID was not changed.') flash(u'Cancelled. The OpenID was not changed.')
return redirect(oid.get_next_url()) return redirect(oid.get_next_url())
openid = request.values.get('openid') openid = request.values.get('openid')