Is there a way to show the day of the week of the datetime object in the template as the actual name of the day of the week? Mostly I want it to print Fridayinstead 5.
Friday
5
See the documentation for the built-in filterdate . From there you will see what you need to use:
date
l Day of the week, text, long. 'Friday'
You can also use:
import datetime today = datetime.datetime.today() print(today.strftime('%A'))
For clarity, the tag template template "l" (lowercase "L") can be used in a Django template, for example:
{{ object.some_date_field | date:"l" }}
Django 1.8.2