commit
19872a711a
5 changed files with 10 additions and 2 deletions
|
@ -22,10 +22,11 @@ History
|
|||
* Improved admin filtering.
|
||||
|
||||
******************
|
||||
0.8.9 (unreleased)
|
||||
0.8.9 (2016-10-25)
|
||||
******************
|
||||
|
||||
* Optimized querysets
|
||||
* Fixed slug generation in wizard
|
||||
|
||||
******************
|
||||
0.8.8 (2016-09-04)
|
||||
|
|
|
@ -3,6 +3,6 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
__author__ = 'Iacopo Spalletti'
|
||||
__email__ = 'i.spalletti@nephila.it'
|
||||
__version__ = '0.9b4'
|
||||
__version__ = '0.9b5'
|
||||
|
||||
default_app_config = 'djangocms_blog.apps.BlogAppConfig'
|
||||
|
|
|
@ -243,6 +243,8 @@ class Post(KnockerModel, ModelMeta, TranslatableModel):
|
|||
"""
|
||||
if self.publish and self.date_published is None:
|
||||
self.date_published = timezone.now()
|
||||
if not self.slug and self.title:
|
||||
self.slug = slugify(self.title)
|
||||
super(Post, self).save(*args, **kwargs)
|
||||
|
||||
def save_translation(self, translation, *args, **kwargs):
|
||||
|
|
|
@ -548,6 +548,10 @@ class ModelsTest(BaseTest):
|
|||
self.assertEqual(new_category.count_all_sites, 1)
|
||||
self.assertEqual(self.category_1.count_all_sites, 2)
|
||||
|
||||
def test_slug(self):
|
||||
post = Post.objects.language('en').create(title='I am a title')
|
||||
self.assertEqual(post.slug, 'i-am-a-title')
|
||||
|
||||
def test_model_attributes(self):
|
||||
self.get_pages()
|
||||
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -9,6 +9,7 @@ deps =
|
|||
django18: django-filer<1.3
|
||||
django18: cmsplugin-filer<1.2
|
||||
django18: django-haystack
|
||||
django18: djangocms-admin-style>1.2,<1.3
|
||||
django19: Django>=1.9,<1.10
|
||||
django19: django-mptt>=0.8
|
||||
django19: django-filer<1.3
|
||||
|
|
Loading…
Reference in a new issue