In django, I'm validating a date:
from datetime import date
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
if start_date < date.today():
raise ValidationError(
_('%(start_date)s must be on or after today.'),
params={'start_date': start_date},
)
where start_date
is a datetime
instance.
What do I need to write in place of s
in %(start_date)s
in order to format the date nicely; preferably as dd-mmm-yyyy?