コード例 #1
0
ファイル: app.py プロジェクト: CeeWai/Map
class EditEventForm(FlaskForm):
    title = StringField('Title',
                        validators=[Length(min=1, max=50)],
                        render_kw={"placeholder": "Title"})
    area = StringField('Area',
                       validators=[Length(min=4, max=50)],
                       render_kw={"placeholder": "Area"})
    start_date = DateTimeField(
        'Starting Time',
        format="20%y-%m-%d %H:%M:%S",
        render_kw={"placeholder": "Year-Month-Day Hour:Minutes:Seconds"},
        widget=DateTimePickerWidget())
    end_date = DateTimeField(
        'Ending Time',
        format="20%y-%m-%d %H:%M:%S",
        render_kw={"placeholder": "Year-Month-Day Hour:Minutes:Seconds"},
        widget=DateTimePickerWidget())
    desc = StringField('Description',
                       widget=TextArea(),
                       render_kw={"placeholder": "Description"})
    image = FileField('Event Image')
    submit = SubmitField('Edit Event')
コード例 #2
0
ファイル: api.py プロジェクト: autogestion/fittime-server
class EventsForm(form.Form):
    name = fields.TextField('Name')
    start = DateTimeField('Start Time', widget=DateTimePickerWidget())
    end = DateTimeField('End Time', widget=DateTimePickerWidget())
コード例 #3
0
ファイル: admin.py プロジェクト: oneross/redash
 def handle_datetime_tz_field(self, model, field, **kwargs):
     kwargs['widget'] = DateTimePickerWidget()
     return field.name, fields.DateTimeField(**kwargs)