Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 3
0
class CarSketchForm(FlaskForm):
    sketch = file.FileField('Файл скетчу',
                            validators=[
                                file.FileRequired(),
                                file.FileAllowed([
                                    'ino',
                                ], 'Тільки файли з розшренням .ino!')
                            ])
    submit = wtforms.SubmitField('Відправити')
Ejemplo n.º 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')
Ejemplo n.º 5
0
class CodeForTestCaseForm(FlaskForm):
    code = file.FileField("File", validators=[file.FileRequired()])
    language = fields.SelectField("Language")
Ejemplo n.º 6
0
class SolutionForm(FlaskForm):
    code = file.FileField("File", validators=[file.FileRequired()])
Ejemplo n.º 7
0
class UploadForm(FlaskForm):
    file_uploaded = wtf_file.FileField('Fichier',
                                       validators=[wtf_file.FileRequired()])
    description = f.StringField('Description')

    submit_button = f.SubmitField('Envoyer')
Ejemplo n.º 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')