- Created export_system_config.py command:
* Exports Plans, Credit Costs, AI Models, Industries, Sectors, etc.
* Saves to JSON files for V1.0 configuration backup
* Includes metadata with export timestamp and stats
* Usage: python manage.py export_system_config --output-dir=backups/config
- Created cleanup_user_data.py command:
* Safely deletes all user-generated data
* DRY-RUN mode to preview deletions
* Confirmation prompt for safety
* Production environment protection
* Deletes: Sites, Keywords, Content, Images, Transactions, Logs, etc.
* Preserves: System config and user accounts
* Usage: python manage.py cleanup_user_data --dry-run
python manage.py cleanup_user_data --confirm
Both commands essential for V1.0 pre-launch cleanup
Multiple Migfeat: Update publishing terminology and add publishing settings
- Changed references from "WordPress" to "Site" across multiple components for consistency.
- Introduced a new "Publishing" tab in Site Settings to manage automatic content approval and publishing behavior.
- Added publishing settings model to the backend with fields for auto-approval, auto-publish, and publishing limits.
- Implemented Celery tasks for scheduling and processing automated content publishing.
- Enhanced Writer Dashboard to include metrics for content published to the site and scheduled for publishing.
ARCHITECTURE FIX:
- aws-admin IntegrationSettings will NEVER exist (it's a legacy pattern)
- Only user's own account IntegrationSettings can exist (if they override defaults)
- Otherwise GlobalIntegrationSettings is used directly
- API keys are ALWAYS from GlobalIntegrationSettings (accounts cannot override API keys)
REMOVED:
- All aws-admin Account lookups
- All aws-admin IntegrationSettings fallback attempts
- Confusing nested try/except chains
CORRECT FLOW NOW:
1. Try account's IntegrationSettings for config overrides
2. Use GlobalIntegrationSettings for missing values and ALL API keys
3. No intermediate aws-admin lookups