refactor-migration again

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-26 15:12:14 +00:00
parent 2ef98b5113
commit f88aae78b1
23 changed files with 942 additions and 211 deletions

View File

@@ -11,6 +11,34 @@ class Tasks(SiteSectorBaseModel):
('completed', 'Completed'),
]
CONTENT_TYPE_CHOICES = [
('post', 'Post'),
('page', 'Page'),
('product', 'Product'),
('taxonomy', 'Taxonomy'),
]
CONTENT_STRUCTURE_CHOICES = [
# Post structures
('article', 'Article'),
('guide', 'Guide'),
('comparison', 'Comparison'),
('review', 'Review'),
('listicle', 'Listicle'),
# Page structures
('landing_page', 'Landing Page'),
('business_page', 'Business Page'),
('service_page', 'Service Page'),
('general', 'General'),
('cluster_hub', 'Cluster Hub'),
# Product structures
('product_page', 'Product Page'),
# Taxonomy structures
('category_archive', 'Category Archive'),
('tag_archive', 'Tag Archive'),
('attribute_archive', 'Attribute Archive'),
]
title = models.CharField(max_length=255, db_index=True)
description = models.TextField(blank=True, null=True)
cluster = models.ForeignKey(
@@ -34,16 +62,18 @@ class Tasks(SiteSectorBaseModel):
content_type = models.CharField(
max_length=100,
db_index=True,
help_text="Content type: post, page, product, service, category, tag, etc.",
db_column='entity_type',
help_text="Content type: post, page, product, taxonomy",
choices=CONTENT_TYPE_CHOICES,
default='post',
blank=True,
null=True
)
content_structure = models.CharField(
max_length=100,
db_index=True,
help_text="Content structure/format: article, listicle, guide, comparison, product_page, etc.",
db_column='cluster_role',
help_text="Content structure: article, guide, comparison, review, listicle, landing_page, etc.",
choices=CONTENT_STRUCTURE_CHOICES,
default='article',
blank=True,
null=True
)
@@ -104,9 +134,37 @@ class Content(SiteSectorBaseModel):
Final architecture: simplified content management.
"""
CONTENT_TYPE_CHOICES = [
('post', 'Post'),
('page', 'Page'),
('product', 'Product'),
('taxonomy', 'Taxonomy'),
]
CONTENT_STRUCTURE_CHOICES = [
# Post structures
('article', 'Article'),
('guide', 'Guide'),
('comparison', 'Comparison'),
('review', 'Review'),
('listicle', 'Listicle'),
# Page structures
('landing_page', 'Landing Page'),
('business_page', 'Business Page'),
('service_page', 'Service Page'),
('general', 'General'),
('cluster_hub', 'Cluster Hub'),
# Product structures
('product_page', 'Product Page'),
# Taxonomy structures
('category_archive', 'Category Archive'),
('tag_archive', 'Tag Archive'),
('attribute_archive', 'Attribute Archive'),
]
# Core content fields
title = models.CharField(max_length=255, db_index=True)
content_html = models.TextField(help_text="Final HTML content", db_column='html_content')
content_html = models.TextField(help_text="Final HTML content")
cluster = models.ForeignKey(
'planner.Clusters',
on_delete=models.SET_NULL,
@@ -116,20 +174,18 @@ class Content(SiteSectorBaseModel):
help_text="Parent cluster (required)"
)
content_type = models.CharField(
max_length=100,
max_length=50,
choices=CONTENT_TYPE_CHOICES,
default='post',
db_index=True,
help_text="Content type: post, page, product, service, category, tag, etc.",
db_column='entity_type',
blank=True,
null=True
help_text="Content type: post, page, product, taxonomy"
)
content_structure = models.CharField(
max_length=100,
max_length=50,
choices=CONTENT_STRUCTURE_CHOICES,
default='article',
db_index=True,
help_text="Content structure/format: article, listicle, guide, comparison, product_page, etc.",
db_column='cluster_role',
blank=True,
null=True
help_text="Content structure/format based on content type"
)
# Taxonomy relationships