feat: add people sections and opt-in read more
This commit is contained in:
@@ -63,7 +63,9 @@ class MainProduct(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
slug = models.SlugField(unique=True, blank=True)
|
||||
short_description = models.CharField(max_length=300)
|
||||
read_more_short_description = models.BooleanField(default=False, help_text="Collapse the short description with Read more.")
|
||||
description = models.TextField()
|
||||
read_more_description = models.BooleanField(default=False, help_text="Collapse the full description with Read more.")
|
||||
description_format = models.CharField(
|
||||
max_length=20, choices=CONTENT_FORMAT_CHOICES, default=FORMAT_PLAIN
|
||||
)
|
||||
@@ -104,7 +106,9 @@ class SubProduct(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
slug = models.SlugField(blank=True)
|
||||
short_description = models.CharField(max_length=300)
|
||||
read_more_short_description = models.BooleanField(default=False, help_text="Collapse the short description with Read more.")
|
||||
description = models.TextField()
|
||||
read_more_description = models.BooleanField(default=False, help_text="Collapse the full description with Read more.")
|
||||
description_format = models.CharField(
|
||||
max_length=20, choices=CONTENT_FORMAT_CHOICES, default=FORMAT_PLAIN
|
||||
)
|
||||
@@ -166,6 +170,7 @@ class Article(models.Model):
|
||||
)
|
||||
title = models.CharField(max_length=300)
|
||||
description = models.TextField()
|
||||
read_more_description = models.BooleanField(default=False, help_text="Collapse this article text with Read more.")
|
||||
description_format = models.CharField(
|
||||
max_length=20, choices=CONTENT_FORMAT_CHOICES, default=FORMAT_PLAIN
|
||||
)
|
||||
@@ -433,6 +438,7 @@ class ArticleSection(models.Model):
|
||||
)
|
||||
title = models.CharField(max_length=200)
|
||||
value = models.TextField()
|
||||
read_more_value = models.BooleanField(default=False, help_text="Collapse this section text with Read more.")
|
||||
value_format = models.CharField(
|
||||
max_length=20, choices=CONTENT_FORMAT_CHOICES, default=FORMAT_PLAIN
|
||||
)
|
||||
@@ -458,6 +464,7 @@ class ArticleCitation(models.Model):
|
||||
related_name="citations",
|
||||
)
|
||||
text = models.TextField(help_text="Full citation text.")
|
||||
read_more_text = models.BooleanField(default=False, help_text="Collapse a long citation with Read more.")
|
||||
url = models.URLField(blank=True, help_text="Optional link to the cited source.")
|
||||
order = models.PositiveIntegerField(default=0)
|
||||
|
||||
@@ -488,6 +495,7 @@ class ProductVideo(VideoBlockMixin, models.Model):
|
||||
badge = models.CharField(max_length=100, blank=True)
|
||||
title = models.CharField(max_length=300, blank=True)
|
||||
description = models.TextField(blank=True)
|
||||
read_more_description = models.BooleanField(default=False, help_text="Collapse this video description with Read more.")
|
||||
order = models.PositiveIntegerField(default=0)
|
||||
is_active = models.BooleanField(default=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user