Updated upgrade script to no longer change url_for that don't need to be changed

This commit is contained in:
Armin Ronacher 2011-06-27 01:04:18 +02:00
parent 874079bffe
commit 85efa3f895
3 changed files with 59 additions and 18 deletions

View file

@ -1 +1,2 @@
{{ url_for('static', filename='test.css') }}
{{ url_for('foo.static', filename='test.css') }}

View file

@ -1,4 +1,4 @@
from flask import Flask, Module, render_template
from flask import Flask, Module, render_template, url_for
mod = Module(__name__)
@ -12,8 +12,17 @@ def after_request(response):
return response
@app.route('/')
def index_foo():
x1 = url_for('somemod.index')
x2 = url_for('.index')
return render_template('test/index.html')
@mod.route('/')
def index():
x1 = url_for('somemod.index')
x2 = url_for('.index')
return render_template('test/index.html')