fix: show product in replacement of sub products in homepage

This commit is contained in:
mohamad
2026-05-26 17:38:53 +03:30
parent cacf1ba77b
commit 52516d5a5a
17 changed files with 402 additions and 205 deletions
@@ -21,6 +21,8 @@ MAIN_PRODUCTS = [
"(IBSI 1.0), and implements image filters standardized against IBSI 2.0."
),
"order": 1,
"show_on_homepage": True,
"homepage_order": 1,
"sub_products": [
{
"name": "Image Processing",
@@ -34,8 +36,6 @@ MAIN_PRODUCTS = [
"for consistent, reproducible research outcomes."
),
"order": 1,
"show_on_homepage": True,
"homepage_order": 1,
"articles": [
{
"title": "Image Filtering Techniques",
@@ -408,10 +408,6 @@ class Command(BaseCommand):
self.stdout.write(self.style.SUCCESS("Content seeded successfully."))
def _seed_products(self):
SubProduct.objects.filter(show_on_homepage=False, homepage_order=0).update(
show_on_homepage=True,
)
for product_data in MAIN_PRODUCTS:
sub_products_data = product_data.pop("sub_products")
main_product, created = MainProduct.objects.get_or_create(