Python django国际月
我有这个permalink def:Python django国际月,python,django,localization,django-urls,Python,Django,Localization,Django Urls,我有这个permalink def: @models.permalink def get_absolute_url(self): creation_date = timezone.localtime(self.start_publication) return ('entry_detail', (), { 'year': creation_date.strftime('%Y'), 'month': creation_
@models.permalink
def get_absolute_url(self):
creation_date = timezone.localtime(self.start_publication)
return ('entry_detail', (), {
'year': creation_date.strftime('%Y'),
'month': creation_date.strftime('%b').lower(),
'day': creation_date.strftime('%d'),
'slug': self.slug})
url如下所示:
/新闻/2012/10/20/slug标题
oct是英语的,不是我当地指定的语言。我怎样才能用“okt”代替“oct”
以下是我的设置:
LANGUAGE_CODE = 'nb'
USE_I18N = True
USE_L10N = True