Complete the code to format the date using the Django template date filter.
{{ post.published_date|[1] }}The date filter formats a date object. Here, "Y-m-d" formats the date as year-month-day.
Complete the code to get the length of the list using the Django template length filter.
{{ user.friends|[1] }}The length filter returns the number of items in a list or string.
Fix the error in the code to provide a default value if the variable is empty.
{{ user.nickname|[1] }}The default filter shows a fallback value if the variable is empty or undefined.
Fill both blanks to format the date and provide a default if the date is missing.
{{ event.start_date|[1]|[2] }}First, the date filter formats the date. Then, default shows a message if the date is missing.
Fill all three blanks to get the length of a list, provide a default if empty, and convert the result to a string.
{{ items|[1]|[2]|[3] }}First, length counts items. Then, default sets '0' if empty. Finally, stringformat:"%s" converts the number to a string.