コード例 #1
0
 def prepare_form_data(self, form):
     date = form.cleaned_data["date"]
     start = str_to_datetime(date, form.cleaned_data["start"])
     end = str_to_datetime(date, form.cleaned_data["end"])
     return {FIELD_SEPARATOR.join(("start", "datetime")): start, FIELD_SEPARATOR.join(("end", "datetime")): end}
コード例 #2
0
 def prepare_form_data(self, form):
     start = form.cleaned_data["start_dt"].astimezone(utc)
     end = form.cleaned_data["end_dt"].astimezone(utc)
     return {FIELD_SEPARATOR.join(("start", "datetime")): start, FIELD_SEPARATOR.join(("end", "datetime")): end}