Updated upgrade script to no longer change url_for that don't need to be changed
This commit is contained in:
parent
874079bffe
commit
85efa3f895
3 changed files with 59 additions and 18 deletions
|
|
@ -1 +1,2 @@
|
|||
{{ url_for('static', filename='test.css') }}
|
||||
{{ url_for('foo.static', filename='test.css') }}
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue