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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
{% block head %}
{{ super() }}
<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; }
</style>
<link href="{{ tweets.feed_url }}" rel="alternate" title="Flask on Twitter" type="application/atom+xml">

View file

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

View file

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

View file

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

View file

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

View file

@ -32,7 +32,7 @@ def logout():
def login():
if g.user is not None:
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.')
return redirect(oid.get_next_url())
openid = request.values.get('openid')