class AddPageForm(Form): date_added = fields.DateField('Publish On:',format="%m-%d-%Y",widget=DateWidget()) date_end = fields.DateField('Expire On:',format="%m-%d-%Y",validators=[validators.Optional()],widget=DateWidget()) name = fields.StringField('Page Name',validators=[validators.InputRequired()]) description = fields.TextAreaField('Description',validators=[validators.Optional()]) slug = fields.StringField('Page Slug',validators=[validators.InputRequired()]) short_url = fields.StringField('Url',validators=[validators.Optional()]) title = fields.StringField('Page Title',validators=[validators.InputRequired()]) add_to_nav = fields.BooleanField('Add to Navbar') add_sidebar = fields.BooleanField('Add Sidebar') visible = fields.SelectField(choices=((1,'Publish'),(0,'Draft'))) meta_title = fields.StringField('Meta Title',validators=[validators.InputRequired()]) content = CodeMirrorField('Content',language='xml',config={'lineNumbers':'true'}) template = fields.FormField(BaseTemplateForm,label="Template",separator='_') blocks = fields.SelectMultipleField(label="blocks",choices=[('a','a'),('b','b'),('c','c')]) category = QuerySelectField('category') tags = TagField('Tags') use_base_template = fields.BooleanField('Use Base Template') base_template = fields.SelectField( 'base template',validators=[ validators.InputRequired() ],choices=[ (x,x) for x in sorted(get_page_templates()) \ if not x.startswith('_') and not \ x.startswith('.') and x.endswith('.html') ] ) submit = fields.SubmitField('Save')
class MyForm(FlaskForm): source_code = CodeMirrorField( language="fortran", config={ "lineNumbers": "true", "viewportMargin": 800 }, ) submit = SubmitField("Submit", render_kw={"class": "btn btn-primary"})
class ModuleForm(Form): source_code = CodeMirrorField( language='python', config={ 'lineNumbers': 'true', 'matchBrackets': 'true', 'indentWithTabs': 'true', 'indentUnit': 4 }, )
class MyForm(Form): source_code = CodeMirrorField( language='application/x-httpd-php', config={ 'lineNumbers': 'true', 'matchBrackets': 'true', 'indentWithTabs': 'true', 'indentUnit': 4 }, ) submit = SubmitField('Analyze')
class ArticlePostForm(FlaskForm): section = SelectField('Раздел: ', coerce=int) title = StringField('Название: ', validators=[DataRequired(), Length(min=3, max=80)]) description = TextAreaField('Описание (опционально): ', validators=[Length(min=0, max=300)], render_kw={ "minlength": "0", "maxlength": "300", }) data = CodeMirrorField(language='markdown', config={'lineNumbers': 'true'}) hash = HiddenField(label=None) submit = SubmitField("Отправить")
class CodemirrorForm(FlaskForm): source_code = CodeMirrorField(language='python', config={'lineNumbers': 'true'}) submit = SubmitField('Submit') inputs = TextAreaField(u'inputs')
class SendProgram(FlaskForm): source_code = CodeMirrorField(language='python', config={'lineNumbers' : 'true'}) category = SelectField(choices=[('cpp', 'C++'), ('pas', 'Pascal ABC')]) submit = SubmitField('Отправить')
class MyForm(Form): code = CodeMirrorField(language='python', id='test', config={'linenumbers': True})
class CodeForm(Form): content = CodeMirrorField('content') file_name = fields.HiddenField('file_name') submit = fields.SubmitField('submit')
class MyForm(FlaskForm): source_code = CodeMirrorField(language='sql', config={'lineNumbers': 'true'}) submit = SubmitField('执行')
class EditorForm(FlaskForm): rule_name = StringField('Name') rule_partition = StringField('Partition', default='Common') rule_body = CodeMirrorField(language='tcl', config={'lineNumbers': 'true'})