Fix get_post_link template tag
It now generates dates in links correctly
This commit is contained in:
@@ -12,4 +12,5 @@ def get_post_relative_link(post):
|
|||||||
|
|
||||||
@register.simple_tag(takes_context = True)
|
@register.simple_tag(takes_context = True)
|
||||||
def get_post_link(context, post):
|
def get_post_link(context, post):
|
||||||
return context['request'].build_absolute_uri(reverse('blog:read', args=(post.created_at.year, post.created_at.month, post.created_at.day, post.slug)))
|
return context['request'].build_absolute_uri(get_post_relative_link(post))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user