Added template system to Attract extension.

This commit is contained in:
2016-09-06 18:46:28 +02:00
parent a89e98c556
commit 168e59805e
6 changed files with 116 additions and 4 deletions

View File

@@ -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."""

View File

@@ -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')