"Fossies" - the Fresh Open Source Software Archive

Member "buku-4.3/bukuserver/forms.py" (31 Jan 2020, 755 Bytes) of package /linux/privat/buku-4.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "forms.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 4.2.2_vs_4.3.

    1 """Forms module."""
    2 # pylint: disable=too-few-public-methods, missing-docstring
    3 from flask_wtf import FlaskForm
    4 import wtforms
    5 
    6 
    7 class SearchBookmarksForm(FlaskForm):
    8     keywords = wtforms.FieldList(wtforms.StringField('Keywords'), min_entries=1)
    9     all_keywords = wtforms.BooleanField('Match all keywords')
   10     deep = wtforms.BooleanField('Deep search')
   11     regex = wtforms.BooleanField('Regex')
   12 
   13 
   14 class HomeForm(SearchBookmarksForm):
   15     keyword = wtforms.StringField('Keyword')
   16 
   17 
   18 class BookmarkForm(FlaskForm):
   19     url = wtforms.StringField(
   20         validators=[wtforms.validators.DataRequired(), wtforms.validators.URL(require_tld=False)])
   21     title = wtforms.StringField()
   22     tags = wtforms.StringField()
   23     description = wtforms.TextAreaField()