Tuesday, January 26, 2016

self.publish.strftime('%m')

return reverse('blog:post_detail', args=[self.publish.year,
self.publish.strftime('%m'),
self.publish.strftime('%d'),
self.slug])
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<post>[-\w]+)/$',
views.post_detail, name='post_detail'),

i feel confused why publish.year(type int) don't use strftime method .


--
林攀


可莱丝面膜低至4.5元 /片,限量疯抢中!马上去抢>>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13f04da4.235f.1527e2079a1.Coremail.18610710105%40163.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment