开发者

Date filter: wrong format

I have this field in my Post model:

created = models.DateTimeField(_('created'), default=datetime.now)

In my template I have this:

{{ post.created|date:"SHORT_DATE_FORMAT" }}

I my settings.py I have this:

LANGUAGE_CODE = 'it'
USE_L10N = True

But I get this:

th03-0500RCDT_marAMCDTE_maggio-0500RMagAMCDT

Why ?

This is the documentation: http://do开发者_如何学JAVAcs.djangoproject.com/en/dev/ref/templates/builtins/#date

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜