realms-wiki/realms/modules/search/views.py

10 lines
355 B
Python
Raw Normal View History

2014-11-10 18:54:46 +02:00
from flask import abort, g, render_template, request, redirect, Blueprint, flash, url_for, current_app
2014-11-13 01:06:56 +02:00
from realms import search as search_engine
2014-11-12 01:06:28 +02:00
2014-11-10 18:54:46 +02:00
blueprint = Blueprint('search', __name__)
@blueprint.route('/_search')
def search():
2014-11-13 01:06:56 +02:00
results = search_engine.wiki(request.args.get('q'))
2014-11-10 18:54:46 +02:00
return render_template('search/search.html', results=results)