Merge pull request #173 from gazpachoking/module_static

Make modules contain their own static files and templates
This commit is contained in:
Matthew Scragg 2016-09-02 12:45:54 -04:00 committed by GitHub
commit f49ef01f52
20 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1,18 @@
{% extends 'layout.html' %}
{% block body %}
{% if results %}
<h3>Results for <em class="text-info">{{ request.args.get('q') }}</em></h3>
<div class="list-group">
{% for r in results %}
<a href="{{ url_for('wiki.page', name=r['name']) }}" class="list-group-item">
<h4 class="list-group-item-heading">{{ r['name'] }}</h4>
<p class="list-group-item-text">
{{ r['content'][:100] }}
</p>
</a>
{% endfor %}
</div>
{% else %}
<h3>No results found for <em class="text-info">{{ request.args.get('q') }}</em></h3>
{% endif %}
{% endblock %}

View file

@ -2,7 +2,7 @@ from flask import render_template, request, Blueprint, current_app
from flask.ext.login import current_user
from realms import search as search_engine
blueprint = Blueprint('search', __name__)
blueprint = Blueprint('search', __name__, template_folder='templates')
@blueprint.route('/_search')