Split up testsuite and moved it to flask.testsuite. This fixes #246

This commit is contained in:
Armin Ronacher 2011-08-26 11:21:26 +01:00
parent 85ed1bf058
commit 4cb6eea8f1
42 changed files with 2575 additions and 2336 deletions

View file

@ -0,0 +1,7 @@
from flask import Flask
app = Flask(__name__)
from blueprintapp.apps.admin import admin
from blueprintapp.apps.frontend import frontend
app.register_blueprint(admin)
app.register_blueprint(frontend)

View file

@ -0,0 +1,15 @@
from flask import Blueprint, render_template
admin = Blueprint('admin', __name__, url_prefix='/admin',
template_folder='templates',
static_folder='static')
@admin.route('/')
def index():
return render_template('admin/index.html')
@admin.route('/index2')
def index2():
return render_template('./admin/index.html')

View file

@ -0,0 +1 @@
/* nested file */

View file

@ -0,0 +1 @@
Admin File

View file

@ -0,0 +1 @@
Hello from the Admin

View file

@ -0,0 +1,8 @@
from flask import Blueprint, render_template
frontend = Blueprint('frontend', __name__, template_folder='templates')
@frontend.route('/')
def index():
return render_template('frontend/index.html')

View file

@ -0,0 +1 @@
Hello from the Frontend

View file

@ -0,0 +1,4 @@
import os
import flask
here = os.path.abspath(os.path.dirname(__file__))
app = flask.Flask(__name__)

View file

@ -0,0 +1,4 @@
import os
import flask
here = os.path.abspath(os.path.dirname(__file__))
app = flask.Flask(__name__)

View file

@ -0,0 +1,7 @@
from flask import Flask
app = Flask(__name__)
from moduleapp.apps.admin import admin
from moduleapp.apps.frontend import frontend
app.register_module(admin)
app.register_module(frontend)

View file

@ -0,0 +1,14 @@
from flask import Module, render_template
admin = Module(__name__, url_prefix='/admin')
@admin.route('/')
def index():
return render_template('admin/index.html')
@admin.route('/index2')
def index2():
return render_template('./admin/index.html')

View file

@ -0,0 +1 @@
/* nested file */

View file

@ -0,0 +1 @@
Admin File

View file

@ -0,0 +1 @@
Hello from the Admin

View file

@ -0,0 +1,9 @@
from flask import Module, render_template
frontend = Module(__name__)
@frontend.route('/')
def index():
return render_template('frontend/index.html')

View file

@ -0,0 +1 @@
Hello from the Frontend

View file

@ -0,0 +1,4 @@
from flask import Module
mod = Module(__name__, 'foo', subdomain='foo')

View file

@ -0,0 +1 @@
Hello Subdomain