コード例 #1
0
ファイル: forms_board.py プロジェクト: 813492291816/BitChan
class Post(FlaskForm):
    board_id = StringField("Board ID")
    thread_id = StringField("Thread ID")
    is_op = StringField("Is OP")
    op_sha256_hash = StringField("OP Hash")
    from_address = StringField("From Address")
    default_from_address = BooleanField("Set default From")
    chan = StringField("Chan")
    nation = SelectField("Nations")
    subject = StringField("Subject")
    body = StringField("Body")
    sage = BooleanField("Sage")
    ttl = IntegerField("TTL")
    file1 = MultipleFileField("Upload Images/Files")
    file2 = MultipleFileField("Upload Images/Files")
    file3 = MultipleFileField("Upload Images/Files")
    file4 = MultipleFileField("Upload Images/Files")
    strip_exif = BooleanField("Strip EXIF")
    image1_spoiler = BooleanField("Image 1 Spoiler")
    image2_spoiler = BooleanField("Image 2 Spoiler")
    image3_spoiler = BooleanField("Image 3 Spoiler")
    image4_spoiler = BooleanField("Image 4 Spoiler")
    upload = SelectField("Upload")
    upload_cipher_and_key = StringField("Upload Encryption Cipher")
    message_id = StringField("Message ID")
    page_id = StringField("Page ID")
    start_download = SubmitField("Download File")
    submit = SubmitField("Submit")
コード例 #2
0
class SProductForm(FlaskForm):
    name = StringField('Product name',
                       validators=[InputRequired(),
                                   Length(1, 64)])
    images = MultipleFileField(
        'Product Images',
        validators=[InputRequired(),
                    FileAllowed(images, 'Images only!')])
    description = TextAreaField('Description', [InputRequired()])
    categories = QuerySelectMultipleField(
        'Categories',
        validators=[InputRequired()],
        get_label='name',
        query_factory=lambda: db.session.query(MCategory).order_by('order'))
    availability = BooleanField(u'Is it currently available?')
    min_order_quantity = IntegerField('Min number of units per order e.g 1',
                                      default=1)
    length = FloatField('Length in numbers only e.g 0.99')
    weight = FloatField('Weight in numbers only e.g 0.21')
    height = FloatField('Height in numbers only e.g 10')
    price = FloatField('Price, Figures only e.g 16.99')
    price_currency = QuerySelectField(
        'Price currency',
        validators=[InputRequired()],
        get_label='name',
        query_factory=lambda: db.session.query(MCurrency).order_by('name'))
    is_featured = BooleanField("Is Featured ?")
    lead_time = StringField('Delivery time')
    submit = SubmitField('Submit')
コード例 #3
0
class toolUpdate(FlaskForm):
  """
  Tool update form
  """
  toolname = StringField('Tool name')

  papername = StringField('Paper Title', validators=[DataRequired()])
  authorname = StringField('Contact author Name')
  authoremail = StringField('Contact author Email', validators=[DataRequired(), Email('Please enter valid email address')])

  linktopdf = StringField('Link to publicly available version of the paper', validators=[valid_url_check])
  linktoarchive = StringField('Link to published version (ACM/IEEE/peerJ etc.)', validators=[DataRequired(), valid_url_check])
  linktodemo = StringField('Link to demo (youtube)', validators=[valid_url_check])

  bibtex = TextAreaField('BibTex entry', validators=[DataRequired()])
  description = TextAreaField('A short description on the Paper/Artifact', validators=[DataRequired()])

  tags = StringField('Tags', validators=[DataRequired()])

  year = StringField('Year of publication')
  conference = StringField('Conference Name')

  files = TextAreaField('Exisiting files', render_kw={'disabled': 'true'}) ## Displaying already uploaded files

  choices = [(item, item) for item in FILETYPE_CHOICES]
  dropdown_choices = SelectField(choices=choices)
  file_types = StringField()

  choices = [(item, item) for item in CATEGORY_LIST]
  category = SelectField('Paper category', choices=choices)

  linktotoolwebpage = StringField('Link to tool download', validators=[accept_specific_links])
  all_files = MultipleFileField('You can either add files or overwrite the existing files by using the same filename!', validators=[file_validation])

  update = SubmitField('Update information')
コード例 #4
0
class UploadMultipleForm(FlaskForm):
    """
    Class for uploading multiple files. Note that the FileAllowed validator
    does not work for MultipleFileField.
    """
    files = MultipleFileField('Files')
    submit = SubmitField('Submit')
コード例 #5
0
class AddPhotosForm(FlaskForm):
    """
    форма добавления фотографий в альбом
    """
    slug = HiddenField()
    images = MultipleFileField('Выберите файлы для загрузки',
                               validators=[FileAllowed(photos, 'Image only!')])
コード例 #6
0
ファイル: challenges.py プロジェクト: itsTurnip/CTFd
class ChallengeFilesUploadForm(BaseForm):
    file = MultipleFileField(
        "Upload Files",
        description="Attach multiple files using Control+Click or Cmd+Click.",
        validators=[InputRequired()],
    )
    submit = SubmitField("Upload")
コード例 #7
0
ファイル: forms.py プロジェクト: soffiafdz/Qrater
class EditDatasetForm(FlaskForm):
    """Form for editing an existing dataset."""

    dataset = SelectField("Dataset", validators=[DataRequired()])
    new_name = StringField("Dataset's name")
    privacy = BooleanField("Private")

    # This can only be edited in the BACKEND:
    share_ratings = BooleanField("Sharing")

    # Precomments/Subratings:
    # Concatenated strings with '___'
    sr_change = BooleanField("Subratings")
    sr_ids = StringField("IDs")
    sr_texts = StringField("Precomment")
    sr_ratings = StringField("Rating")
    sr_keybindings = StringField("KeyBinding")

    # Choices for this will be generated in the route
    viewers = SelectMultipleField("Raters", coerce=int)
    sub_regex = StringField("Subjects' label (regex)")
    sess_regex = StringField("Sessions' label (regex)")
    cohort_regex = StringField("Cohort label (regex)")
    type_regex = StringField("Image type label (regex)")
    imgs_to_upload = MultipleFileField('MRI files')
    submit = SubmitField('Upload')
コード例 #8
0
ファイル: forms.py プロジェクト: rafaeljk84/analytics-tools
class CsvUploadForm(FlaskForm):
    csv_files = MultipleFileField([FileRequired()])
    filename_field = StringField(
        'Nome do arquivo de saída',
        validators=[DataRequired(),
                    Length(min=1, max=20, message=None)])
    windowlength = SelectField('Selecione a largura de janela (window length)',
                               choices=[('3', '3'), ('5', '5'), ('7', '7'),
                                        ('9', '9'), ('11', '11'), ('13', '13'),
                                        ('15', '15')])

    polyorder = SelectField('Selecione a ordem polinomial (polyorder)',
                            choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                     ('4', '4'), ('5', '5'), ('6', '6')])

    derivative = SelectField('Selecione a ordem da derivada',
                             choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                      ('4', '4')])

    deltalambda = SelectField('Selecione o delta lambda',
                              choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                       ('4', '4'), ('5', '5'), ('6', '6'),
                                       ('7', '7'), ('8', '8'), ('9', '9'),
                                       ('10', '10')])

    def validate_form(form, files):
        if not files[0].filename:
            raise ValidationError('Você não inseriu nenhum arquivo')

        for file in files:
            if not file.filename.endswith('.csv'):
                raise ValidationError('Você inseriu arquivos que não são CSV')
コード例 #9
0
ファイル: forms.py プロジェクト: xaviercallens/VectorCloud
class UploadScript(FlaskForm):
    script_name = StringField(
        'Name of SDK application',
        validators=[DataRequired(), Length(min=1, max=18)])

    description = TextAreaField('Description')

    author = StringField('Author Name')

    website = StringField('Website')

    script = FileField('Set Main Python File',
                       validators=[FileAllowed(['py'])])

    script_helpers = MultipleFileField('Add Support Files',
                                       validators=[FileAllowed(['py'])])

    icon = FileField('Add Icon Image',
                     validators=[FileAllowed(['jpg', 'png'])])

    upload = SubmitField('Upload')

    update = SubmitField('Update')

    run_in_bkrd = BooleanField('Run in Background?')

    hex_id = StringField('Hex')
コード例 #10
0
class CreateAlbumForm(FlaskForm):
    name = StringField("Name", validators=[DataRequired()])
    photo = MultipleFileField(validators=[
        MultiFileAllowed(["jpg", "png", "jpeg", "gif", "heic"], "Image Only!"),
        InputRequired(),
    ])
    submit = SubmitField("Create album")
コード例 #11
0
ファイル: forms.py プロジェクト: isaacrivas10/fb_chatbot
class ProductForm(FlaskForm):

    imgs= MultipleFileField(label='Imagenes', validators=[datarequired, FileAllowed(['jpg','png','jpeg'])])
    name= StringField('Nombre de Producto', validators=[datarequired, Length(min=4, max=20)])
    brand= SelectField('Marca', validators=[datarequired])
    category= SelectField('Categoria', validators=[datarequired])
    is_available= BooleanField('Disponible', default='checked')
    price= DecimalField('Precio', places=2, validators=[datarequired])
    discount= BooleanField('Esta en descuento?')
    discount_price= DecimalField('Descuento', places=2, validators=[datarequired])
    productStatus= SelectField('Estado',
    choices=[
        ('1', 'Nuevo'),
        ('2', 'Semi Nuevo'),
        ('3', 'Usado'),
        ('4', 'Reparado'),
        ('5', 'Repuestos')
        ], validators=[datarequired])
    delivery= SelectField('Entrega',
        choices=[('1', 'Digital'),
            ('2', 'Fisica')
            ], validators=[datarequired])
    description= TextAreaField('Descripcion del Producto', validators=[datarequired])
    save= SubmitField('Guardar Producto')
    
    def __init__(self, *args, **kwargs):
        super(ProductForm, self).__init__(*args, **kwargs)
        self.brand.choices= get_name_tuple(Brand)
        self.category.choices= get_name_tuple(Category)
コード例 #12
0
ファイル: form.py プロジェクト: malan-project/malan
class FileForm(FlaskForm):
    test_file = MultipleFileField('Files')
    submit = SubmitField('Diagnosis')

    def validate_test_file(self, test_file):
        if len(test_file.data) == 1 and test_file.data[0].filename == '':
            raise ValidationError("This field is required.")
コード例 #13
0
class ProductForm(FlaskForm):
    product_name = StringField('Product name',
                               validators=[DataRequired(),
                                           Length(1, 60)])
    category_id = SelectField('Category',
                              coerce=int,
                              validators=[DataRequired()])
    supplier_id = SelectField('Supplier',
                              coerce=int,
                              validators=[DataRequired()])
    sku = StringField('SKU', validators=[DataRequired(), Length(1, 20)])
    unit_price = DecimalField('Unit price',
                              places=6,
                              validators=[DataRequired()])
    discount = FloatField('Discount', default=0.0)
    units_in_stock = IntegerField('Units in stock')
    description = TextAreaField('Description')
    images = MultipleFileField('Add images')
    save = SubmitField('Save')
    save_and_continue = SubmitField('Save and add another')

    def validate_discount(self, field):
        if field.data < 0 or field.data > 1:
            raise ValidationError('Discount has to be from 0 to 1.')

    def validate_unit_price(self, field):
        if field.data < 0:
            raise ValidationError('Price has to be positive.')
コード例 #14
0
class AddLessonForm(FlaskForm):
    lesson_name = StringField('Название урока', validators=[DataRequired()])
    preview = FileField('Превью урока',
                        validators=[DataRequired()],
                        render_kw={'accept': 'image/*'})
    video = FileField('Видео',
                      validators=[DataRequired()],
                      render_kw={'accept': 'video/*'})
    about_lesson = TextAreaField('Описание урока', validators=[DataRequired()])
    attached_file = MultipleFileField('Вложенные файлы')
    extra_material = TextAreaField('Дополнительный материал',
                                   validators=[DataRequired()])
    meta_tags = StringField('Мета-теги', validators=[DataRequired()])
    submit = SubmitField('Добавить урок')

    def validate_lesson_name(self, lesson_name):
        if len(lesson_name.data) >= 256:
            raise ValidationError('Длина не должна превышать 256 символов')

    def validate_about_lesson(self, about_lesson):
        if len(about_lesson.data) >= 3000:
            raise ValidationError('Длина не должна превышать 3000 символов')

    def validate_extra_material(self, extra_material):
        if len(extra_material.data) >= 20000:
            raise ValidationError('Длина не должна превышать 20000 символов')
コード例 #15
0
ファイル: forms.py プロジェクト: foxcodenine/small-projects
class ProjectForm(FlaskForm):
    name = StringField(u'project name', validators=[DataRequired()])
    address = StringField(u'address', validators=[DataRequired()])
    locality = StringField(u'locality', validators=[DataRequired()])    
    ref_number = IntegerField(u'ref no', validators=[Optional()])
    pa_number = StringField(u'PA no', validators=[Optional()])

    ref_client = SelectField(u'ref client', choices=[], coerce=int, validators=[Optional()])
    status = SelectField(u'status', choices=[], coerce=int, validators=[Optional()])
    category = SelectField(u'category', choices=[], coerce=int, validators=[Optional()])

    images = MultipleFileField(
        u'images', render_kw={'multiple': True}, validators=[Optional()]
    )

    date = DateField(u'date', validators=[Optional()])

    content = TextAreaField(u'content', validators=[Optional()])

    submit = SubmitField()


    def __init__(
        self, ref_client_options=None, status_options=None, 
        category_options=None
    ):

        super().__init__() # calls the base initialisation and then...

        if ref_client_options:
            self.ref_client.choices  = [(0, '')] + [(r['key'], r['value']) for r in ref_client_options]
        if status_options:
            self.status.choices      = [(0, '')] + [(o['key'], o['value']) for o in status_options]
        if category_options:
            self.category.choices    = [(0, '')] + [(c['key'], c['value']) for c in category_options]
コード例 #16
0
class NotesEntryForm(FlaskForm):
    notes_text = TextAreaField(
        'Notes', [validators.Length(max=10000)],
        description="Notes from submitter accompanying submission")
    notes_attachment = MultipleFileField(
        'Attachments',
        description="File attachments from submitter accompanying submission")
コード例 #17
0
class addProductForm(FlaskForm):
    category = SelectField('Category:', coerce=int, id='select_category')
    sku = IntegerField('Product SKU (optional):', validators=[Optional()])
    product_name_zh = StringField('Product Name in Chinese:',
                                  validators=[DataRequired()])
    product_name_en = StringField('Product Name in English:',
                                  validators=[DataRequired()])
    product_name_fr = StringField('Product Name in French:',
                                  validators=[DataRequired()])
    description_zh = TextAreaField('Product Description in Chinese:',
                                   validators=[DataRequired()])
    description_en = TextAreaField('Product Description in English:',
                                   validators=[DataRequired()])
    description_fr = TextAreaField('Product Description in French:',
                                   validators=[DataRequired()])
    productPrice = FloatField('Product Price:', validators=[Optional()])
    productVariant1 = StringField('Product variant 1:',
                                  validators=[Optional()])
    productVariant2 = StringField('Product variant 2:',
                                  validators=[Optional()])
    productVariant3 = StringField('Product variant 3:',
                                  validators=[Optional()])
    productVariant4 = StringField('Product variant 4:',
                                  validators=[Optional()])
    productVariant5 = StringField('Product variant 5:',
                                  validators=[Optional()])
    productQuantity = IntegerField('Product Quantity:',
                                   validators=[DataRequired()])
    product_imgs = MultipleFileField('Product Images',
                                     validators=[FileAllowed(['jpg', 'png'])])
    submit = SubmitField('Save')
コード例 #18
0
ファイル: pages.py プロジェクト: Gu-f/CTFd_chinese_CN
class PageFilesUploadForm(BaseForm):
    file = MultipleFileField(
        "上传文件",
        description="使用 Control键+鼠标左键 或 Cmd键+鼠标左键 进行附加上传多个文件",
        validators=[InputRequired()],
    )
    type = HiddenField("页面类型", default="page", validators=[InputRequired()])
コード例 #19
0
ファイル: forms.py プロジェクト: gracideas/spekcheck
class SubmissionForm(FlaskForm):
    musicbrainz_album_id = StringField(
        'MusicBrainz ID', validators=[DataRequired(),
                                      Length(min=36, max=36)])
    source = TextField('Source', validators=[DataRequired(), Length(min=5)])
    upload = MultipleFileField('Upload', validators=[FileRequired()])
    submit = SubmitField('Submit')
コード例 #20
0
ファイル: forms.py プロジェクト: blazephoenix/virtual-labs
class AddLabForm(FlaskForm):
    title = StringField('Title', validators=[DataRequired(), Length(min=5)])
    stream = StringField('Stream', validators=[DataRequired()])
    description = TextAreaField('Description', validators=[DataRequired()])
    date = DateField('Date', validators=[DataRequired()])
    files = MultipleFileField('Add File(s)')
    submit = SubmitField('Submit')
コード例 #21
0
ファイル: forms.py プロジェクト: fullonic/myp
class ProjectForm(Form):
    """Basic Project Form."""

    files = MultipleFileField(label="Upload your files",
                              id="upload",
                              validators=[DataRequired()])
    project_name = StringField("Project name", validators=[DataRequired()])
    color = SelectField(
        "color",
        validators=[DataRequired()],
        choices=[
            ("Blue", "Blue"),
            ("Red", "Red"),
            ("Purple", "Purple"),
            ("Orange", "Orange"),
            ("Green", "Green"),
        ],
    )
    tiles = SelectField(
        "tiles",
        validators=[DataRequired()],
        choices=[
            ("OpenStreetMap", "OSM"),
            ("CartoDB positron", "CartoDB Positron"),
            ("CartoDB dark_matter", "CartoDB Dark Matter"),
            ("Stamen Terrain", "Stamen Terrain"),
            ("Stamen Toner", "Stamen Toner"),
            ("Stamen Watercolor", "Stamen Watercolor"),
        ],
    )
    bg_job = BooleanField(label="Let me know when is ready", id="bg_job")
コード例 #22
0
class ChallengeFilesUploadForm(BaseForm):
    file = MultipleFileField(
        "上传文件",
        description="使用 Control键+鼠标左键 或 Cmd键+鼠标左键 进行附加上传多个文件.",
        validators=[InputRequired()],
    )
    submit = SubmitField("上传")
コード例 #23
0
class ItemForm(FlaskForm):
    category = StringField('Category',
                           validators=[DataRequired(),
                                       Length(min=2, max=20)])
    typeofitem = StringField(
        'Type', validators=[DataRequired(),
                            Length(min=2, max=20)])
    images = MultipleFileField(u'Image File', validators=[DataRequired()])

    def validate_image(form, field):
        if field.data:
            field.data = re.sub(r'[^a-z0-9_.-]', '_', field.data)

    brand = StringField('Brand',
                        validators=[DataRequired(),
                                    Length(min=1, max=20)])
    short_Description = StringField(
        'Short Description',
        validators=[DataRequired(), Length(min=1, max=50)])
    description = StringField(
        'Description', validators=[DataRequired(),
                                   Length(min=1, max=200)])
    mrp = IntegerField('M R P', validators=[DataRequired()])
    discount = IntegerField('Discount', validators=[DataRequired()])
    sizenqty = SizeQtyField('Size and Quantity ', validators=[DataRequired()])
    productDetails = TagListField('Product Details',
                                  validators=[DataRequired()])
    material_Care = TagListField('Material & Care',
                                 validators=[DataRequired()])
    tags = TagListField('Tags', validators=[DataRequired()])
    submit = SubmitField('Submit')
コード例 #24
0
ファイル: forms.py プロジェクト: pengjinfu/12306_flask
class MultiUploadForm(FlaskForm):
    photo = MultipleFileField('upload images',
                              validators=[
                                  FileRequired(),
                                  FileAllowed(['jpg', 'jpeg', 'png', 'gif'])
                              ])
    submit = SubmitField()
コード例 #25
0
ファイル: forms.py プロジェクト: soumya173/mobistore
class AdminProductAdd(FlaskForm):
    name = TextField('Name', validators=[DataRequired(), Length(min=2, max=30)])
    type = TextField('Type', validators=[DataRequired(), Length(min=2, max=20)])
    description = TextField('Description', validators=[DataRequired(), Length(min=2, max=40)])
    price = IntegerField('Price', validators=[DataRequired(),])
    file = MultipleFileField('Image File(s)')
    labels = TextField('Labels', validators=[])
コード例 #26
0
ファイル: forms.py プロジェクト: julipoc/RealEstateCroatia
class PostForm(FlaskForm):
    title = StringField("Title ", validators=[DataRequired()])
    county = SelectField(
        "County ",
        validators=[DataRequired()],
        choices=[
            " ", "Bjelovarsko-bilogorska", "Brodsko-posavska",
            "Dubrovačko-neretvanska", "Istarska", "Karlovačka",
            "Koprivničko-križevačka", "Krapinsko-zagorska", "Ličko-senjska",
            "Međimurska", "Osječko-baranjska", "Požeško-slavonska",
            "Primorsko-goranska", "Sisačko-moslavačka", "Splitsko-dalmatinska",
            "Šibensko-kninska", "Varaždinska", "Virovitičko-podravska",
            "Vukovarsko-srijemska", "Zadarska", "Zagrebačka", "Grad Zagreb"
        ])
    quadrature = IntegerField("Quadrature (m2) ")
    price = IntegerField("Price (€) ")
    property_type = SelectField("Type ",
                                validators=[DataRequired()],
                                choices=[" ", "House", "Apartment"])
    text = TextAreaField("Text ", validators=[DataRequired()])
    sale_rent = SelectField("Sale/Rent ",
                            validators=[DataRequired()],
                            choices=[" ", "For sale", "For rent"])
    property_pics = MultipleFileField("Property pictures ",
                                      validators=[FileAllowed(["png", "jpg"])])
    submit = SubmitField("Post")
コード例 #27
0
ファイル: forms.py プロジェクト: jose1522/Scientific-Journal
class experimentForm(ModelForm):
    class Meta:
        model = Experiment
        exclude = ['active']

    photos = MultipleFileField('Experiment Photos')
    main_objective = TextAreaField(
        u'Main Objective', validators=[DataRequired(),
                                       Length(max=3000)])
    project_id = qs(query_factory=lambda: Project.getByAll(),
                    get_pk=lambda a: a.id,
                    get_label=lambda a: a.name,
                    allow_blank=False,
                    label='Project Name')
    experimenter_id = QuerySelectField(
        query_factory=lambda: Person.getByAll(),
        get_pk=lambda a: a.id,
        get_label=lambda a: "{0} {1}, {2}".format(a.firstSurname, a.
                                                  secondSurname, a.name),
        allow_blank=False,
        label='Experimenter Name',
    )

    witness_id = QuerySelectField(
        query_factory=lambda: Person.getByAll(),
        get_pk=lambda a: a.id,
        get_label=lambda a: "{0} {1}, {2}".format(a.firstSurname, a.
                                                  secondSurname, a.name),
        allow_blank=False,
        label='Assistant Name',
    )
コード例 #28
0
ファイル: forms.py プロジェクト: fuliginCloak/Directory
class AddPost(FlaskForm):
    title = StringField('Listing Title', validators=[DataRequired()])
    price = StringField('Asking Price', validators=[DataRequired()])
    acres = FloatField('Total Acres')

    state = SelectField('What State', coerce=str, validators=[DataRequired()])
    county = StringField('What County')

    short = TextField('Provide Summary of Description',
                      validators=[DataRequired()])
    long = TextField('Provide Full Description')
    images = MultipleFileField(
        'Select Images', validators=[FileAllowed(['jpg', 'png', 'jpeg'])])

    submit = SubmitField('Submit listing')

    def set_context(self):
        self.state.choices = [("AL", "AL"), ("AK", "AK"), ("AZ", "AZ"),
                              ("AR", "AR"), ("CA", "CA"), ("CO", "CO"),
                              ("CT", "CT"), ("DC", "DC"), ("DE", "DE"),
                              ("FL", "FL"), ("GA", "GA"), ("HI", "HI"),
                              ("ID", "ID"), ("IL", "IL"), ("IN", "IN"),
                              ("IA", "IA"), ("KS", "KS"), ("KY", "KY"),
                              ("LA", "LA"), ("MA", "MA"), ("MD", "MD"),
                              ("ME", "ME"), ("MI", "MI"), ("MN", "MN"),
                              ("MS", "MS"), ("MO", "MO"), ("MT", "MT"),
                              ("NC", "NC"), ("ND", "ND"), ("NE", "NE"),
                              ("NH", "NH"), ("NJ", "NJ"), ("NV", "NV"),
                              ("NM", "NM"), ("NY", "NY"), ("OH", "OH"),
                              ("OK", "OK"), ("OR", "OR"), ("PA", "PA"),
                              ("RI", "RI"), ("SC", "SC"), ("SD", "SD"),
                              ("TN", "TN"), ("TX", "TX"), ("UT", "UT"),
                              ("VA", "VA"), ("VT", "VT"), ("WA", "WA"),
                              ("WI", "WI"), ("WV", "WV"), ("WY", "WY")]
コード例 #29
0
ファイル: forms.py プロジェクト: jarquinsandra/consensus_win
class CalculateConsensusForm(FlaskForm):
    file = MultipleFileField('txt files')
    submit_file = SubmitField('calculate consensus')
    step = FloatField('bin', default=0.003)
    window = FloatField('window', default= 0.01)
    noise_level = FloatField('noise level', default = 1.0)
    peak_presence = FloatField('peak presence', default = 0.5)
コード例 #30
0
class PageFilesUploadForm(BaseForm):
    file = MultipleFileField(
        "Upload Files",
        description="Attach multiple files using Control+Click or Cmd+Click.",
        validators=[InputRequired()],
    )
    type = HiddenField("Page Type", default="page", validators=[InputRequired()])