Beispiel #1
0
 class Meta:
     model = Settings
     exclude = ["semester"]
     widgets = {
         "open_registration": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
         "close_registration": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
     }
Beispiel #2
0
 class Meta:
     model = Event
     exclude = ["semester", "name", "description", "meeting_point"]
     widgets = {
         "begin": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
         "end": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
     }
Beispiel #3
0
    class Meta:
        model = Practica
        fields = ["nombre", "inicio", "termino", "descripcion"]
        widgets = {  # Use localization and bootstrap 3
            'inicio':  DateTimePickerInput(format='YYYY-MM-DD HH:mm:ss', attrs={'placeholder': 'YYYY-MM-DD hh:mm:ss'}),
            'termino': DateTimePickerInput(format='YYYY-MM-DD HH:mm:ss', attrs={'placeholder': 'YYYY-MM-DD hh:mm:ss'})

            }
Beispiel #4
0
 class Meta:
     model = Fahrt
     exclude: list[str] = ["semester"]
     widgets = {
         "date": DatePickerInput(format="%Y-%m-%d"),
         "open_registration": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
         "close_registration": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
     }
Beispiel #5
0
 class Meta:
     model = Transportation
     exclude: list[str] = ["fahrt"]
     widgets = {
         "deparure_time": DateTimePickerInput(format="%Y-%m-%d %H:%M"),
         "return_departure_time":
         DateTimePickerInput(format="%Y-%m-%d %H:%M"),
     }
Beispiel #6
0
 class Meta:
     model = Event
     fields = [
         "start_date",
         "end_date",
         "start_time",
         "end_time",
         "start_datetime",
         "end_datetime",
         "start_month",
         "end_month",
         "start_year",
         "end_year",
     ]
     widgets = {
         # fmt: off
         "start_date":
         DatePickerInput(options={
             "format": "YYYY-MM-DD",
             "debug": True
         }).start_of("event active days"),
         "end_date":
         DatePickerInput(options={
             "format": "MM/DD/YYYY"
         }).end_of("event active days"),
         "start_datetime":
         DateTimePickerInput(options={
             "debug": True
         }).start_of("event active dtime"),
         "end_datetime":
         DateTimePickerInput().end_of("event active dtime"),
         "start_time":
         TimePickerInput(options={
             "debug": True
         }).start_of("event active time"),
         "end_time":
         TimePickerInput().end_of("event active time"),
         "start_month":
         MonthPickerInput().start_of("active month"),
         "end_month":
         MonthPickerInput().end_of("active month"),
         "start_year":
         YearPickerInput().start_of("active year"),
         "end_year":
         YearPickerInput().end_of("active year"),
     }
Beispiel #7
0
 class Meta:
     model = Negative
     fields = [
         'film', 'frame', 'caption', 'date', 'lens', 'shutter_speed',
         'aperture', 'filter', 'teleconverter', 'notes', 'mount_adapter',
         'focal_length', 'location', 'flash', 'metering_mode',
         'exposure_program', 'photographer', 'copy_of'
     ]
     widgets = {
         'date':
         DateTimePickerInput(format='%Y-%m-%d %H:%M',
                             options={"sideBySide": True}),
     }
Beispiel #8
0
 class Meta:
     model = Announcement
     fields = [
         'body', 'button_text', 'button_url',
         'start_datetime', 'end_datetime',
         'show_anonymous', 'show_student', 'show_outsider']
     widgets = {
         'start_datetime': DateTimePickerInput(
             options={
                 'format': 'YYYY-MM-DD HH:mm',
                 'locale': 'ja',
                 'minDate': 'now',
                 'sideBySide': True,
                 'toolbarPlacement': 'bottom'}
         ).start_of('active'),
         'end_datetime': DateTimePickerInput(
             options={
                 'format': 'YYYY-MM-DD HH:mm',
                 'locale': 'ja',
                 'minDate': 'now',
                 'sideBySide': True,
                 'toolbarPlacement': 'bottom'}
         ).end_of('active')
     }