Fix get_absolute_url

This commit is contained in:
Iacopo Spalletti 2014-03-07 18:36:41 +01:00
parent 5a1aa5c6bb
commit e00acb07e2

View file

@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_lazy as _, get_language
from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.image import FilerImageField
from parler.models import TranslatableModel, TranslatedFields
@ -117,7 +117,7 @@ class Post(TranslatableModel):
kwargs = {'year': self.date_published.year,
'month': self.date_published.month,
'day': self.date_published.day,
'slug': self.slug}
'slug': self.safe_translation_getter('slug', language_code=get_language())}
return reverse('djangocms_blog:post-detail', kwargs=kwargs)
def thumbnail_options(self):