diff --git a/Makefile b/Makefile index 2cf0aa0f..5572875e 100644 --- a/Makefile +++ b/Makefile @@ -104,22 +104,19 @@ init-prod: @echo "Step 0/6: Ensuring database exists (running migrations)..." @$(PYTHON) -m alembic upgrade heads @echo "" - @echo "Step 1/6: Creating admin user and platform settings..." + @echo "Step 1/5: Creating admin user and platform settings..." $(PYTHON) scripts/seed/init_production.py @echo "" - @echo "Step 2/6: Initializing log settings..." + @echo "Step 2/5: Initializing log settings..." $(PYTHON) scripts/seed/init_log_settings.py @echo "" - @echo "Step 3/6: Creating default CMS content pages..." + @echo "Step 3/5: Creating default CMS content pages..." $(PYTHON) scripts/seed/create_default_content_pages.py @echo "" - @echo "Step 4/6: Creating platform pages and landing..." - $(PYTHON) scripts/seed/create_platform_pages.py - @echo "" - @echo "Step 5/6: Seeding email templates..." + @echo "Step 4/5: Seeding email templates..." $(PYTHON) scripts/seed/seed_email_templates.py @echo "" - @echo "Step 6/6: Seeding subscription tiers..." + @echo "Step 5/5: Seeding subscription tiers..." @echo " (Handled by init_production.py Step 6)" @echo "" @echo "āœ… Production initialization completed" @@ -195,10 +192,6 @@ create-cms-defaults: $(PYTHON) scripts/seed/create_default_content_pages.py @echo "āœ… CMS defaults created" -create-platform-pages: - @echo "šŸ  Creating platform pages and landing..." - $(PYTHON) scripts/seed/create_platform_pages.py - @echo "āœ… Platform pages created" init-logging: @echo "šŸ“ Initializing log settings..." diff --git a/docs/deployment/hetzner-server-setup.md b/docs/deployment/hetzner-server-setup.md index 5b35cf61..47e75000 100644 --- a/docs/deployment/hetzner-server-setup.md +++ b/docs/deployment/hetzner-server-setup.md @@ -395,7 +395,6 @@ docker compose --profile full exec -e PYTHONPATH=/app api python -m alembic upgr docker compose --profile full exec -e PYTHONPATH=/app api python scripts/seed/init_production.py docker compose --profile full exec -e PYTHONPATH=/app api python scripts/seed/init_log_settings.py docker compose --profile full exec -e PYTHONPATH=/app api python scripts/seed/create_default_content_pages.py -docker compose --profile full exec -e PYTHONPATH=/app api python scripts/seed/create_platform_pages.py docker compose --profile full exec -e PYTHONPATH=/app api python scripts/seed/seed_email_templates.py ``` diff --git a/docs/development/seed-scripts-audit.md b/docs/development/seed-scripts-audit.md index 32413837..1b434e3d 100644 --- a/docs/development/seed-scripts-audit.md +++ b/docs/development/seed-scripts-audit.md @@ -12,10 +12,10 @@ | Script | Purpose | In Makefile? | Issues | |--------|---------|--------------|--------| | `seed_demo.py` | Create merchants, stores, customers, products | āœ… Yes | āŒ Missing inventory creation | -| `create_default_content_pages.py` | Create platform CMS pages (about, faq, etc.) | āœ… Yes (`create-cms-defaults`) | āœ… Good | +| `create_default_content_pages.py` | Create platform CMS pages (homepage, about, faq, etc.) for ALL platforms | āœ… Yes (`create-cms-defaults`) | āœ… Good (consolidated) | | `create_inventory.py` | Create inventory for products | āŒ **NO** | āš ļø Should be in seed_demo | | `create_landing_page.py` | Create landing pages for stores | āŒ **NO** | āš ļø Should be in seed_demo | -| `create_platform_pages.py` | Create platform pages | āŒ **NO** | šŸ”“ **DUPLICATE** of create_default_content_pages | +| ~~`create_platform_pages.py`~~ | ~~Create platform pages~~ | - | āœ… **DELETED** (merged into create_default_content_pages) | | `init_production.py` | Create admin user + platform alerts | āœ… Yes (`init-prod`) | āœ… Good | | `init_log_settings.py` | Initialize log settings | āŒ NO | āš ļø Should be in init_production? | diff --git a/docs/features/platform-homepage.md b/docs/features/platform-homepage.md index 9b434239..b099593d 100644 --- a/docs/features/platform-homepage.md +++ b/docs/features/platform-homepage.md @@ -67,8 +67,8 @@ app/ │ └── content_page_service.py # CMS business logic └── main.py # Platform routes (lines 284-404) -scripts/ -└── create_platform_pages.py # Seeder script +scripts/seed/ +└── create_default_content_pages.py # Seeder script (all platforms) docs/features/ └── platform-homepage.md # This file @@ -193,14 +193,17 @@ Manage all platform content pages from a single interface: ```bash # Create all default platform pages -python scripts/seed/create_platform_pages.py +python scripts/seed/create_default_content_pages.py ``` -This creates: +This creates (for all platforms): - Platform Homepage (with modern template) - About Us -- FAQ - Contact Us +- FAQ +- Shipping Policy +- Return & Refund Policy +- Privacy Policy - Terms of Service - Privacy Policy @@ -568,7 +571,7 @@ return templates.TemplateResponse( **Solutions:** 1. Run seeder script: ```bash - python scripts/seed/create_platform_pages.py + python scripts/seed/create_default_content_pages.py ``` 2. Verify page exists: diff --git a/docs/getting-started/platform-homepage-quick-start.md b/docs/getting-started/platform-homepage-quick-start.md index eb0ed0a4..9cc713af 100644 --- a/docs/getting-started/platform-homepage-quick-start.md +++ b/docs/getting-started/platform-homepage-quick-start.md @@ -11,10 +11,10 @@ Quick reference for setting up and customizing the platform homepage and content Run the seeder script to create all default platform pages: ```bash -python scripts/seed/create_platform_pages.py +python scripts/seed/create_default_content_pages.py ``` -This creates: +This creates (for all platforms): - āœ… Platform Homepage (modern template) - āœ… About Us - āœ… FAQ @@ -253,7 +253,7 @@ Result in header: `About | FAQ | Contact` **Fix:** Run seeder script ```bash -python scripts/seed/create_platform_pages.py +python scripts/seed/create_default_content_pages.py ``` ### Navigation menu is empty diff --git a/scripts/seed/create_default_content_pages.py b/scripts/seed/create_default_content_pages.py index 62faf528..b2353b05 100755 --- a/scripts/seed/create_default_content_pages.py +++ b/scripts/seed/create_default_content_pages.py @@ -2,8 +2,9 @@ """ Create Default Platform Content Pages (CMS) -This script creates platform-level default content pages that all stores inherit. -These pages serve as the baseline content for: +This script creates platform-level default content pages for ALL platforms. +Pages include: +- Platform Homepage (platform marketing page) - About Us - Contact - FAQ @@ -12,14 +13,16 @@ These pages serve as the baseline content for: - Privacy Policy - Terms of Service +Pages are created per-platform (unique constraint: platform_id + store_id + slug). Stores can override any of these pages with their own custom content. Prerequisites: - Database migrations must be applied - content_pages table must exist + - Platforms must exist (run init_production.py first) Usage: - python scripts/create_default_content_pages.py + python scripts/seed/create_default_content_pages.py # Or with make: make create-cms-defaults @@ -59,7 +62,32 @@ from app.modules.cms.models import ContentPage from app.modules.tenancy.models import Platform # ============================================================================ -# DEFAULT PAGE CONTENT +# PLATFORM HOMEPAGE (is_platform_page=True) +# ============================================================================ + +PLATFORM_HOMEPAGE = { + "slug": "platform_homepage", + "title": "Welcome to Our Multi-Store Marketplace", + "content": """ +

+ Connect stores with customers worldwide. Build your online store and reach millions of shoppers. +

+

+ Our platform empowers entrepreneurs to launch their own branded e-commerce stores + with minimal effort and maximum impact. +

+ """, + "meta_description": "Leading multi-store marketplace platform. Connect with thousands of stores and discover millions of products.", + "meta_keywords": "marketplace, multi-store, e-commerce, online shopping, platform", + "show_in_footer": False, + "show_in_header": False, + "is_platform_page": True, + "template": "modern", + "display_order": 0, +} + +# ============================================================================ +# DEFAULT STORE CONTENT PAGES (is_platform_page=False) # ============================================================================ DEFAULT_PAGES = [ @@ -479,9 +507,58 @@ DEFAULT_PAGES = [ # ============================================================================ +def _page_exists(db: Session, platform_id: int, slug: str) -> bool: + """Check if a page already exists for the given platform and slug.""" + existing = db.execute( + select(ContentPage).where( + ContentPage.platform_id == platform_id, + ContentPage.store_id.is_(None), + ContentPage.slug == slug, + ) + ).scalar_one_or_none() + return existing is not None + + +def _create_page( + db: Session, platform_id: int, page_data: dict, *, is_platform_page: bool = False +) -> bool: + """Create a single content page. Returns True if created, False if skipped.""" + slug = page_data["slug"] + title = page_data["title"] + + if _page_exists(db, platform_id, slug): + print(f" Skipped: {title} (/{slug}) - already exists") + return False + + page = ContentPage( + platform_id=platform_id, + store_id=None, + slug=slug, + title=title, + content=page_data["content"], + content_format="html", + template=page_data.get("template", "default"), + meta_description=page_data["meta_description"], + meta_keywords=page_data["meta_keywords"], + is_platform_page=is_platform_page, + is_published=True, + published_at=datetime.now(UTC), + show_in_footer=page_data.get("show_in_footer", True), + show_in_header=page_data.get("show_in_header", False), + show_in_legal=page_data.get("show_in_legal", False), + display_order=page_data["display_order"], + created_at=datetime.now(UTC), + updated_at=datetime.now(UTC), + ) + + db.add(page) + print(f" Created: {title} (/{slug})") + return True + + def create_default_pages(db: Session) -> None: """ - Create default platform content pages. + Create default platform content pages for ALL platforms. This function is idempotent - it will skip pages that already exist. """ @@ -489,68 +566,52 @@ def create_default_pages(db: Session) -> None: print("Creating Default Platform Content Pages (CMS)") print("=" * 70 + "\n") - # Resolve OMS platform for platform_id - oms_platform = db.execute( - select(Platform).where(Platform.code == "oms") - ).scalar_one_or_none() - if not oms_platform: - print(" āš ļø OMS platform not found. Run init_production.py first.") + # Load all platforms + platforms = db.execute(select(Platform)).scalars().all() + if not platforms: + print(" No platforms found. Run init_production.py first.") return - platform_id = oms_platform.id - created_count = 0 - skipped_count = 0 + total_created = 0 + total_skipped = 0 - for page_data in DEFAULT_PAGES: - # Check if page already exists (platform default with this slug) - existing = db.execute( - select(ContentPage).where( - ContentPage.store_id is None, ContentPage.slug == page_data["slug"] - ) - ).scalar_one_or_none() + for platform in platforms: + print(f" Platform: {platform.name} (code={platform.code})") - if existing: - print( - f" ā­ļø Skipped: {page_data['title']} (/{page_data['slug']}) - already exists" - ) + created_count = 0 + skipped_count = 0 + + # Create platform homepage + if _create_page(db, platform.id, PLATFORM_HOMEPAGE, is_platform_page=True): + created_count += 1 + else: skipped_count += 1 - continue - # Create new platform default page - page = ContentPage( - platform_id=platform_id, - store_id=None, # Platform default - slug=page_data["slug"], - title=page_data["title"], - content=page_data["content"], - content_format="html", - meta_description=page_data["meta_description"], - meta_keywords=page_data["meta_keywords"], - is_published=True, - published_at=datetime.now(UTC), - show_in_footer=page_data.get("show_in_footer", True), - show_in_header=page_data.get("show_in_header", False), - show_in_legal=page_data.get("show_in_legal", False), - display_order=page_data["display_order"], - created_at=datetime.now(UTC), - updated_at=datetime.now(UTC), - ) + # Create default store content pages + for page_data in DEFAULT_PAGES: + if _create_page(db, platform.id, page_data): + created_count += 1 + else: + skipped_count += 1 - db.add(page) - print(f" āœ… Created: {page_data['title']} (/{page_data['slug']})") - created_count += 1 + print(f" --- {created_count} created, {skipped_count} skipped") + print() + + total_created += created_count + total_skipped += skipped_count db.commit() - print("\n" + "=" * 70) + print("=" * 70) print("Summary:") - print(f" Created: {created_count} pages") - print(f" Skipped: {skipped_count} pages (already exist)") - print(f" Total: {created_count + skipped_count} pages") + print(f" Platforms: {len(platforms)}") + print(f" Created: {total_created} pages") + print(f" Skipped: {total_skipped} pages (already exist)") + print(f" Total: {total_created + total_skipped} pages") print("=" * 70 + "\n") - if created_count > 0: - print("āœ… Default platform content pages created successfully!\n") + if total_created > 0: + print("Default platform content pages created successfully!\n") print("Next steps:") print( " 1. View pages at: /about, /contact, /faq, /shipping, /returns, /privacy, /terms" @@ -558,7 +619,7 @@ def create_default_pages(db: Session) -> None: print(" 2. Stores can override these pages through the store dashboard") print(" 3. Edit platform defaults through the admin panel\n") else: - print("ā„¹ļø All default pages already exist. No changes made.\n") + print("All default pages already exist. No changes made.\n") # ============================================================================ @@ -568,14 +629,14 @@ def create_default_pages(db: Session) -> None: def main(): """Main execution function.""" - print("\nšŸš€ Starting Default Content Pages Creation Script...\n") + print("\nStarting Default Content Pages Creation Script...\n") db = SessionLocal() try: create_default_pages(db) - print("āœ… Script completed successfully!\n") + print("Script completed successfully!\n") except Exception as e: - print(f"\nāŒ Error: {e}\n") + print(f"\nError: {e}\n") db.rollback() raise finally: diff --git a/scripts/seed/create_platform_pages.py b/scripts/seed/create_platform_pages.py deleted file mode 100755 index 04abf0c5..00000000 --- a/scripts/seed/create_platform_pages.py +++ /dev/null @@ -1,540 +0,0 @@ -#!/usr/bin/env python3 -""" -Create Platform Content Pages - -This script creates default platform-level content pages: -- Platform Homepage (slug='platform_homepage') -- About Us (slug='about') -- FAQ (slug='faq') -- Terms of Service (slug='terms') -- Privacy Policy (slug='privacy') -- Contact Us (slug='contact') - -All pages are created with store_id=NULL (platform-level defaults). - -Usage: - python scripts/create_platform_pages.py -""" - -import contextlib -import sys -from pathlib import Path - -# Add project root to path -project_root = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(project_root)) - -# Register all models with SQLAlchemy so string-based relationships resolve -for _mod in [ - "app.modules.billing.models", - "app.modules.inventory.models", - "app.modules.cart.models", - "app.modules.messaging.models", - "app.modules.loyalty.models", - "app.modules.catalog.models", - "app.modules.customers.models", - "app.modules.orders.models", - "app.modules.marketplace.models", - "app.modules.cms.models", -]: - with contextlib.suppress(ImportError): - __import__(_mod) - -from sqlalchemy import select - -from app.core.database import SessionLocal -from app.modules.cms.services import content_page_service -from app.modules.tenancy.models import Platform - - -def create_platform_pages(): - """Create default platform content pages.""" - db = SessionLocal() - - try: - print("=" * 80) - print("CREATING PLATFORM CONTENT PAGES") - print("=" * 80) - print() - - # Import ContentPage for checking existing pages - from app.modules.cms.models import ContentPage - - # Resolve OMS platform - oms_platform = db.execute( - select(Platform).where(Platform.code == "oms") - ).scalar_one_or_none() - if not oms_platform: - print(" āš ļø OMS platform not found. Run init_production.py first.") - return - platform_id = oms_platform.id - - # ======================================================================== - # 1. PLATFORM HOMEPAGE - # ======================================================================== - print("1. Creating Platform Homepage...") - - # Check if already exists - existing = ( - db.query(ContentPage) - .filter_by(store_id=None, slug="platform_homepage") - .first() - ) - if existing: - print( - f" āš ļø Skipped: Platform Homepage - already exists (ID: {existing.id})" - ) - else: - try: - homepage = content_page_service.create_page( - db, - platform_id=platform_id, - slug="platform_homepage", - title="Welcome to Our Multi-Store Marketplace", - content=""" -

- Connect stores with customers worldwide. Build your online store and reach millions of shoppers. -

-

- Our platform empowers entrepreneurs to launch their own branded e-commerce stores - with minimal effort and maximum impact. -

- """, - template="modern", # Uses platform/homepage-modern.html - store_id=None, # Platform-level page - is_published=True, - show_in_header=False, # Homepage is not in menu (it's the root) - show_in_footer=False, - display_order=0, - meta_description="Leading multi-store marketplace platform. Connect with thousands of stores and discover millions of products.", - meta_keywords="marketplace, multi-store, e-commerce, online shopping, platform", - ) - print(f" āœ… Created: {homepage.title} (/{homepage.slug})") - except Exception as e: - print(f" āš ļø Error: Platform Homepage - {str(e)}") - - # ======================================================================== - # 2. ABOUT US - # ======================================================================== - print("2. Creating About Us page...") - - existing = db.query(ContentPage).filter_by(store_id=None, slug="about").first() - if existing: - print(f" āš ļø Skipped: About Us - already exists (ID: {existing.id})") - else: - try: - about = content_page_service.create_page( - db, - platform_id=platform_id, - slug="about", - title="About Us", - content=""" -

Our Mission

-

- We're on a mission to democratize e-commerce by providing powerful, - easy-to-use tools for entrepreneurs worldwide. -

- -

Our Story

-

- Founded in 2024, our platform has grown to serve over 10,000 active stores - and millions of customers around the globe. We believe that everyone should - have the opportunity to build and grow their own online business. -

- -

Why Choose Us?

- - -

Our Values

- - """, - store_id=None, - is_published=True, - show_in_header=True, # Show in header navigation - show_in_footer=True, # Show in footer - display_order=1, - meta_description="Learn about our mission to democratize e-commerce and empower entrepreneurs worldwide.", - meta_keywords="about us, mission, vision, values, merchant", - ) - print(f" āœ… Created: {about.title} (/{about.slug})") - except Exception as e: - print(f" āš ļø Error: About Us - {str(e)}") - - # ======================================================================== - # 3. FAQ - # ======================================================================== - print("3. Creating FAQ page...") - - existing = db.query(ContentPage).filter_by(store_id=None, slug="faq").first() - if existing: - print(f" āš ļø Skipped: FAQ - already exists (ID: {existing.id})") - else: - try: - faq = content_page_service.create_page( - db, - platform_id=platform_id, - slug="faq", - title="Frequently Asked Questions", - content=""" -

Getting Started

- -

How do I create a store account?

-

- Contact our sales team to get started. We'll set up your account and provide - you with everything you need to launch your store. -

- -

How long does it take to set up my store?

-

- Most stores can launch their store in less than 24 hours. Our team will guide - you through the setup process step by step. -

- -

Pricing & Payment

- -

What are your pricing plans?

-

- We offer flexible pricing plans based on your business needs. Contact us for - detailed pricing information and to find the plan that's right for you. -

- -

When do I get paid?

-

- Payments are processed weekly, with funds typically reaching your account - within 2-3 business days. -

- -

Features & Support

- -

Can I customize my store's appearance?

-

- Yes! Our platform supports full theme customization including colors, fonts, - logos, and layouts. Make your store truly yours. -

- -

What kind of support do you provide?

-

- We offer 24/7 email support for all stores, with priority phone support - available for enterprise plans. -

- -

Technical Questions

- -

Do I need technical knowledge to use the platform?

-

- No! Our platform is designed to be user-friendly for everyone. However, if you - want to customize advanced features, our documentation and support team are here to help. -

- -

Can I integrate with other tools?

-

- Yes, we support integrations with popular payment gateways, shipping providers, - and marketing tools. -

- """, - store_id=None, - is_published=True, - show_in_header=True, # Show in header navigation - show_in_footer=True, - display_order=2, - meta_description="Find answers to common questions about our marketplace platform.", - meta_keywords="faq, frequently asked questions, help, support", - ) - print(f" āœ… Created: {faq.title} (/{faq.slug})") - except Exception as e: - print(f" āš ļø Error: FAQ - {str(e)}") - - # ======================================================================== - # 4. CONTACT US - # ======================================================================== - print("4. Creating Contact Us page...") - - existing = ( - db.query(ContentPage).filter_by(store_id=None, slug="contact").first() - ) - if existing: - print(f" āš ļø Skipped: Contact Us - already exists (ID: {existing.id})") - else: - try: - contact = content_page_service.create_page( - db, - platform_id=platform_id, - slug="contact", - title="Contact Us", - content=""" -

Get in Touch

-

- We'd love to hear from you! Whether you have questions about our platform, - need technical support, or want to discuss partnership opportunities, our - team is here to help. -

- -

Contact Information

- - -

Office Address

-

- 123 Business Street, Suite 100
- San Francisco, CA 94102
- United States -

- -

Sales Inquiries

-

- Interested in launching your store on our platform?
- Email: sales@marketplace.com -

- -

Technical Support

-

- Need help with your store?
- Email: support@marketplace.com
- 24/7 email support for all stores -

- -

Media & Press

-

- For media inquiries and press releases:
- Email: press@marketplace.com -

- """, - store_id=None, - is_published=True, - show_in_header=True, # Show in header navigation - show_in_footer=True, - display_order=3, - meta_description="Get in touch with our team. We're here to help you succeed.", - meta_keywords="contact, support, email, phone, address", - ) - print(f" āœ… Created: {contact.title} (/{contact.slug})") - except Exception as e: - print(f" āš ļø Error: Contact Us - {str(e)}") - - # ======================================================================== - # 5. TERMS OF SERVICE - # ======================================================================== - print("5. Creating Terms of Service page...") - - existing = db.query(ContentPage).filter_by(store_id=None, slug="terms").first() - if existing: - print( - f" āš ļø Skipped: Terms of Service - already exists (ID: {existing.id})" - ) - else: - try: - terms = content_page_service.create_page( - db, - platform_id=platform_id, - slug="terms", - title="Terms of Service", - content=""" -

Last updated: January 1, 2024

- -

1. Acceptance of Terms

-

- By accessing and using this marketplace platform, you accept and agree to be - bound by the terms and provisions of this agreement. -

- -

2. Use License

-

- Permission is granted to temporarily access the materials on our platform for - personal, non-commercial transitory viewing only. -

- -

3. Account Terms

- - -

4. Store Responsibilities

- - -

5. Prohibited Activities

-

You may not use our platform to:

- - -

6. Termination

-

- We reserve the right to terminate or suspend your account at any time for - violation of these terms. -

- -

7. Limitation of Liability

-

- In no event shall our merchant be liable for any damages arising out of the - use or inability to use our platform. -

- -

8. Changes to Terms

-

- We reserve the right to modify these terms at any time. We will notify users - of any changes via email. -

- -

9. Contact

-

- If you have any questions about these Terms, please contact us at - legal@marketplace.com. -

- """, - store_id=None, - is_published=True, - show_in_header=False, # Too legal for header - show_in_footer=True, # Show in footer - display_order=10, - meta_description="Read our terms of service and platform usage policies.", - meta_keywords="terms of service, terms, legal, policy, agreement", - ) - print(f" āœ… Created: {terms.title} (/{terms.slug})") - except Exception as e: - print(f" āš ļø Error: Terms of Service - {str(e)}") - - # ======================================================================== - # 6. PRIVACY POLICY - # ======================================================================== - print("6. Creating Privacy Policy page...") - - existing = ( - db.query(ContentPage).filter_by(store_id=None, slug="privacy").first() - ) - if existing: - print(f" āš ļø Skipped: Privacy Policy - already exists (ID: {existing.id})") - else: - try: - privacy = content_page_service.create_page( - db, - platform_id=platform_id, - slug="privacy", - title="Privacy Policy", - content=""" -

Last updated: January 1, 2024

- -

1. Information We Collect

-

We collect information you provide directly to us, including:

- - -

2. How We Use Your Information

-

We use the information we collect to:

- - -

3. Information Sharing

-

- We do not sell your personal information. We may share information with: -

- - -

4. Data Security

-

- We implement appropriate security measures to protect your personal information. - However, no method of transmission over the internet is 100% secure. -

- -

5. Your Rights

-

You have the right to:

- - -

6. Cookies

-

- We use cookies and similar tracking technologies to track activity on our - platform and hold certain information. You can instruct your browser to - refuse cookies. -

- -

7. Changes to This Policy

-

- We may update this privacy policy from time to time. We will notify you of - any changes by posting the new policy on this page. -

- -

8. Contact Us

-

- If you have questions about this Privacy Policy, please contact us at - privacy@marketplace.com. -

- """, - store_id=None, - is_published=True, - show_in_header=False, # Too legal for header - show_in_footer=True, # Show in footer - display_order=11, - meta_description="Learn how we collect, use, and protect your personal information.", - meta_keywords="privacy policy, privacy, data protection, gdpr, personal information", - ) - print(f" āœ… Created: {privacy.title} (/{privacy.slug})") - except Exception as e: - print(f" āš ļø Error: Privacy Policy - {str(e)}") - - db.commit() - - print() - print("=" * 80) - print("āœ… Platform pages creation completed successfully!") - print("=" * 80) - print() - print("Created pages:") - print(" - Platform Homepage: http://localhost:8000/") - print(" - About Us: http://localhost:8000/about") - print(" - FAQ: http://localhost:8000/faq") - print(" - Contact Us: http://localhost:8000/contact") - print(" - Terms of Service: http://localhost:8000/terms") - print(" - Privacy Policy: http://localhost:8000/privacy") - print() - - except Exception as e: - print(f"\nāŒ Error: {e}") - db.rollback() - raise - finally: - db.close() - - -if __name__ == "__main__": - create_platform_pages() diff --git a/scripts/seed/install.py b/scripts/seed/install.py index 2e3fda39..55908473 100755 --- a/scripts/seed/install.py +++ b/scripts/seed/install.py @@ -543,8 +543,7 @@ def main(): init_scripts = [ ("init_production.py", "Admin user and platform settings"), ("init_log_settings.py", "Log settings"), - ("create_default_content_pages.py", "Default CMS pages"), - ("create_platform_pages.py", "Platform pages and landing"), + ("create_default_content_pages.py", "Default CMS pages (all platforms)"), ("seed_email_templates.py", "Email templates"), ]