Under the "Send_mail" function, I would like to change the "Start" variable to display as the date / time MM / DD / YYYY - HH: MM AM / PM In the email do anyone know how to do this is?
Thanks in advance!
date = coerce_date_dict (request.GET) initial_data = none of the date: try: start = datetime.datetime (date **) initial_data = {"start": start, "end" : Start + datetime.timedelta (min = 60)} Exclude writing error: Http404 except ValueError: Http404 enhanced example = If none does, event_id does not have any: example = get_object_or_404 (event, id = event_id) calendar = Get_object_or_404 (calendar, slug = calendar_slug) form = form_class (data = request. POST or none, example = example, initial = initial_data) if form.is_valid (): event = form.save (commit = False) If the example is none: event.creator = request.user Event Calendar = Try Calendar: send_mail ('New Text', '% s'% s'% (request.user.full_name, Start) for a New lesson is determined, except 'example@gmail.com', ['example@gmail.com ']): pass event.save () next = next or reverse (' event ', args = [eve nt. Id]) next = get_next_url (request, adjacent) return to HttpResponseRedirect (next)