Fix get_absolute_url
This commit is contained in:
parent
5a1aa5c6bb
commit
e00acb07e2
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.text import slugify
|
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 djangocms_text_ckeditor.fields import HTMLField
|
||||||
from filer.fields.image import FilerImageField
|
from filer.fields.image import FilerImageField
|
||||||
from parler.models import TranslatableModel, TranslatedFields
|
from parler.models import TranslatableModel, TranslatedFields
|
||||||
|
@ -117,7 +117,7 @@ class Post(TranslatableModel):
|
||||||
kwargs = {'year': self.date_published.year,
|
kwargs = {'year': self.date_published.year,
|
||||||
'month': self.date_published.month,
|
'month': self.date_published.month,
|
||||||
'day': self.date_published.day,
|
'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)
|
return reverse('djangocms_blog:post-detail', kwargs=kwargs)
|
||||||
|
|
||||||
def thumbnail_options(self):
|
def thumbnail_options(self):
|
||||||
|
|
Loading…
Reference in a new issue