Browse Source

start of search

main
crunk 5 months ago
parent
commit
681c34e05e
  1. 6
      verse/search/forms/searchform.py
  2. 8
      verse/search/search.py
  3. 3
      verse/search/templates/search/search.html

6
verse/search/forms/searchform.py

@ -0,0 +1,6 @@
"""SearchForm to search files and distribusis in the distribusi archive"""
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, validators
from wtforms.validators import Length
from wtforms.widgets import TextArea

8
verse/search/search.py

@ -0,0 +1,8 @@
import os
from whoosh.fields import *
from whoosh.index import open_dir
from whoosh.qparser import QueryParser
SCRIPT_DIR = os.path.dirname(__file__)
DATA_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "../data"))

3
verse/search/templates/search/search.html

@ -0,0 +1,3 @@
{% extends "base/base.html" %}
{% block main %}
{% endblock %}
Loading…
Cancel
Save