Added template system to Attract extension.
This commit is contained in:
@@ -57,6 +57,11 @@ class AttractExtension(PillarExtension):
|
||||
"""
|
||||
return [blueprint]
|
||||
|
||||
@property
|
||||
def template_path(self):
|
||||
import os.path
|
||||
return os.path.join(os.path.dirname(__file__), 'templates')
|
||||
|
||||
def setup_app(self, app):
|
||||
"""Connects Blinker signals."""
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
import logging
|
||||
|
||||
from flask import Blueprint
|
||||
from flask import Blueprint, render_template
|
||||
from pillar.api.utils import jsonify
|
||||
|
||||
blueprint = Blueprint('attract', __name__)
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@blueprint.route('/jemoeder')
|
||||
def jemoeder():
|
||||
return jsonify({'je': 'moeder'})
|
||||
@blueprint.route('/')
|
||||
def index():
|
||||
return render_template('attract/index.html')
|
||||
|
||||
|
||||
@blueprint.route('/subversion/kick')
|
||||
|
Reference in New Issue
Block a user