0
私は手動でレンダリングするテンプレートを持っていますが、フィルタを持つ日付はありません。文脈に入れる前に日付を書式設定せずにこれを行う方法はありますか?ここで手動で日付フィルタ付きのdjangoテンプレートをレンダリングする
コードです:
t= This is to notify you that you are booked on the course {{title}} that starts on {{start_date|date:"F j, Y"}} at {{start|time}} and is being held at {{venue}}.
c = {'startdate': datetime.datetime(2010, 12, 1, 9, 0), 'enddate': datetime.datetime(2010, 12, 1, 12, 0), 'has_cpd': False, 'title': 'Course 1', 'closes': None, 'creator': 1L, 'venue': 'Venue for Course 1', 'summary': 'Course 1 Summary', 'tags': '', 'attachment': <FieldFile: None>, 'organiser': 3L, 'id': 1L, 'opens': datetime.datetime(2010, 11, 30, 20, 1, 50, 951490), 'venue_map': None}
t.render(c)
これは、出力が得られます。
This is to notify you that you are booked on the course Course 1 that starts on at and is being held at Venue for Course 1.
は日付が表示されないのはなぜ?
ありがとう! – PhoebeB