Пример #1
0
class UploadVideoForm(FlaskForm):
    title = wtf.StringField(
        'title',
        validators=[wtf.validators.DataRequired()]
    )
    description = wtf.TextAreaField(
        'description',
        validators=[wtf.validators.DataRequired()]
    )
    price = wtf.DecimalField(
        'price',
        validators=[wtf.validators.DataRequired()]
    )
    labels = wtf.StringField(
        'labels',
        validators=[wtf.validators.DataRequired()]
    )
    video_file = fwtff.FileField(
        'vfile',
        validators=[
            fwtff.FileRequired(),
            fwtff.FileAllowed(['mp4'])
        ]
    )
    submit = wtf.SubmitField('submit')
Пример #2
0
class ReportForm(FlaskForm):
    broker = SelectField('Market',
                         validators=[DataRequired()],
                         choices=(
                             (Portfolio.ALFA, Portfolio.ALFA),
                             (Portfolio.VTB, Portfolio.VTB),
                         ))
    report = file.FileField(validators=[file.FileRequired()])
    test = HiddenField('test')
Пример #3
0
class CarSketchForm(FlaskForm):
    sketch = file.FileField('Файл скетчу',
                            validators=[
                                file.FileRequired(),
                                file.FileAllowed([
                                    'ino',
                                ], 'Тільки файли з розшренням .ino!')
                            ])
    submit = wtforms.SubmitField('Відправити')
Пример #4
0
class UploadForm(FlaskForm):
    save = FileField('Your save file', [
        file.FileRequired(),
        file.FileAllowed(
            savefiles,
            'Only .user files or .zip or .gz compressed uploads allowed')
    ])
    upload_all = RadioField('Upload all?',
                            choices=[
                                (1, 'Upload all solutions'),
                                (0, 'Let me choose which solutions to upload')
                            ],
                            default=1,
                            coerce=int)
    submit = SubmitField('Upload')
Пример #5
0
class CodeForTestCaseForm(FlaskForm):
    code = file.FileField("File", validators=[file.FileRequired()])
    language = fields.SelectField("Language")
Пример #6
0
class SolutionForm(FlaskForm):
    code = file.FileField("File", validators=[file.FileRequired()])
Пример #7
0
class UploadForm(FlaskForm):
    file_uploaded = wtf_file.FileField('Fichier',
                                       validators=[wtf_file.FileRequired()])
    description = f.StringField('Description')

    submit_button = f.SubmitField('Envoyer')
Пример #8
0
class PluginUploadForm(FlaskForm):
    upload = file.FileField('Choose your addon file', [
        file.FileRequired(),
        file.FileAllowed(['zip'], 'Zip file only!'), plugin_validate
    ])
    submit = SubmitField('Upload')