fix: show product in replacement of sub products in homepage
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user