|
|
|
|
@ -83,7 +83,7 @@ class Article(TranslatableModel): |
|
|
|
|
translations = TranslatedFields( |
|
|
|
|
main_title = models.CharField(max_length=255), |
|
|
|
|
preview = models.TextField(), |
|
|
|
|
description = models.TextField(), |
|
|
|
|
description = models.TextField(blank=False), |
|
|
|
|
#-----meta |
|
|
|
|
title = models.CharField(max_length=255, blank=True), |
|
|
|
|
descriptions = models.CharField(max_length=255, blank=True), |
|
|
|
|
@ -121,8 +121,8 @@ class Article(TranslatableModel): |
|
|
|
|
self.slug = self.generate_unique_slug() |
|
|
|
|
|
|
|
|
|
#Set the description field on save. |
|
|
|
|
if self.gen_description: |
|
|
|
|
self.description = strip_tags(self.description_from_content()) |
|
|
|
|
#if self.gen_description: |
|
|
|
|
# self.description = strip_tags(self.description_from_content()) |
|
|
|
|
super(Article, self).save(*args, **kwargs) |
|
|
|
|
|
|
|
|
|
def description_from_content(self): |
|
|
|
|
|