11 KiB
Django Admin Bulk Actions - Quick Reference Guide
Overview
This guide provides a quick reference for all bulk actions implemented across 39 Django admin models in the IGNY8 platform.
Common Action Patterns
1. Status Toggle Actions
Pattern: bulk_activate / bulk_deactivate
Models: Account, Plan, Site, Sector, Clusters, ContentTaxonomy, CreditPackage, AIPrompt, IntegrationSettings, AuthorProfile, Strategy, and more
Usage:
- Select records in admin list view
- Choose "Activate/Deactivate selected" from actions dropdown
- Click "Go"
- Confirmation message shows count of updated records
2. Soft Delete Actions
Pattern: bulk_soft_delete
Models: Account, Content, Keywords, Tasks, Site, Sector, Clusters, ContentIdeas, Images, Industry, IndustrySector, SeedKeyword, Subscription, User
Usage:
- Select records to delete
- Choose "Soft delete selected" action
- Records marked as deleted, not removed from database
- Preserves data for audit trails
3. Import/Export Operations
Export Only: 21 models (logs, payment methods, deployment records, etc.) Import & Export: 18 models (content, ideas, keywords, plans, etc.)
Usage:
- Export: Click "Export" button → Select format (CSV/XLSX) → Download
- Import: Click "Import" button → Upload file → Preview → Confirm
4. Form-Based Actions
Pattern: Actions requiring user input via intermediate form
Examples:
bulk_add_credits/bulk_subtract_credits(Account)bulk_assign_cluster(ContentIdeas)bulk_assign_to_user(Tasks)bulk_upgrade_plan(Subscription)bulk_update_frequency(AutomationConfig)
Usage:
- Select records
- Choose action from dropdown
- Fill in form on intermediate page
- Click "Apply" to execute
Model-Specific Actions Guide
Account Management
Account
- Bulk add credits (Form: amount to add)
- Bulk subtract credits (Form: amount to remove)
- Bulk activate accounts
- Bulk suspend accounts
- Bulk soft delete
Use Cases:
- Credit adjustments for promotions
- Account suspension for policy violations
- Account activation after verification
User
- Bulk activate users
- Bulk deactivate users
- Bulk assign to group (Form: select group)
- Bulk reset password
- Bulk verify email
- Bulk soft delete
Use Cases:
- Team member management
- Role assignments via groups
- Password resets for security
Plan & Subscription
Plan:
- Bulk activate/deactivate
- Bulk clone plans
Subscription:
- Bulk activate/cancel
- Bulk renew (extends expiry)
- Bulk upgrade plan (Form: select new plan)
- Bulk soft delete
Use Cases:
- Plan modifications
- Subscription renewals
- Plan upgrades for customers
Content Management
Content
- Bulk publish to WordPress
- Bulk mark as published
- Bulk mark as draft
- Bulk add taxonomy (Form: multi-select taxonomies)
- Bulk soft delete
Use Cases:
- Content publishing workflow
- Status management
- Taxonomy assignments
Tasks
- Bulk assign to user (Form: select user)
- Bulk mark as completed
- Bulk mark as in progress
- Bulk cancel tasks
- Bulk soft delete
Use Cases:
- Task distribution to writers
- Workflow state management
- Task cleanup
Images
- Bulk approve/reject
- Bulk mark as featured
- Bulk unmark as featured
- Bulk soft delete
Use Cases:
- Image moderation
- Featured image management
Planning & SEO
Keywords
- Bulk mark as reviewed
- Bulk approve keywords
- Bulk reject keywords
- Bulk soft delete
Use Cases:
- Keyword research review
- SEO strategy approval
Clusters
- Bulk activate/deactivate
- Bulk soft delete
Use Cases:
- Content cluster management
- Topic organization
ContentIdeas
- Bulk approve/reject
- Bulk assign cluster (Form: select cluster)
- Bulk update content type (Form: select type)
- Bulk update priority (Form: select priority)
- Bulk soft delete
Use Cases:
- Content pipeline management
- Editorial planning
- Priority adjustments
Taxonomy & Organization
ContentTaxonomy
- Bulk activate
- Bulk merge taxonomies (Form: select target, handles relations)
Use Cases:
- Taxonomy consolidation
- Category management
ContentAttribute
- Bulk activate
- Bulk update attribute type (Form: select type)
Use Cases:
- Attribute management
- Schema updates
ContentTaxonomyRelation
- Bulk delete relations
- Bulk reassign taxonomy (Form: select new taxonomy)
Use Cases:
- Relationship cleanup
- Taxonomy reassignment
ContentClusterMap
- Bulk delete maps
- Bulk update role (Form: pillar/supporting/related)
- Bulk reassign cluster (Form: select cluster)
Use Cases:
- Content structure management
- Cluster reorganization
Billing & Finance
Invoice
- Bulk mark as paid
- Bulk mark as pending
- Bulk mark as cancelled
- Bulk send reminders
- Bulk apply late fee
Use Cases:
- Payment processing
- Invoice management
- Collections workflow
Payment
- Bulk mark as verified
- Bulk mark as failed
- Bulk refund (updates status)
Use Cases:
- Payment reconciliation
- Refund processing
CreditUsageLog
- Bulk delete old logs (>90 days)
Use Cases:
- Database cleanup
- Log maintenance
CreditPackage
- Bulk activate/deactivate
Use Cases:
- Package availability management
AccountPaymentMethod
- Bulk enable/disable
- Bulk set as default (Form: respects account-level uniqueness)
- Bulk delete methods
Use Cases:
- Payment method management
- Default method updates
PlanLimitUsage
- Bulk reset usage
- Bulk delete old records (>90 days)
Use Cases:
- Usage tracking reset
- Data cleanup
Publishing & Integration
PublishingRecord
- Bulk retry failed
- Bulk cancel pending
- Bulk mark as published
Use Cases:
- Publishing workflow
- Error recovery
DeploymentRecord
- Bulk rollback
- Bulk mark as successful
- Bulk retry failed
Use Cases:
- Deployment management
- Error recovery
SiteIntegration
- Bulk activate/deactivate
- Bulk test connection
- Bulk refresh tokens
Use Cases:
- Integration management
- Connection testing
- Token maintenance
SyncEvent
- Bulk mark as processed
- Bulk delete old events (>30 days)
Use Cases:
- Event processing
- Log cleanup
Automation
AutomationConfig
- Bulk activate/deactivate
- Bulk update frequency (Form: select frequency)
- Bulk update delays (Form: enter delay values)
Use Cases:
- Automation scheduling
- Workflow configuration
AutomationRun
- Bulk mark as completed
- Bulk retry failed
- Bulk delete old runs (>90 days)
Use Cases:
- Run status management
- Error recovery
- Cleanup
AI & System Configuration
AITaskLog
- Bulk delete old logs (>90 days)
- Bulk mark as reviewed
Use Cases:
- Log maintenance
- Review tracking
AIPrompt
- Bulk activate/deactivate
- Bulk reset to default values
Use Cases:
- Prompt management
- Configuration reset
IntegrationSettings
- Bulk activate/deactivate
- Bulk test connection
Use Cases:
- Integration setup
- Connection validation
AuthorProfile
- Bulk activate/deactivate
- Bulk clone profiles
Use Cases:
- Profile management
- Profile duplication
Strategy
- Bulk activate/deactivate
- Bulk clone strategies
Use Cases:
- Strategy management
- Strategy templates
OptimizationTask
- Bulk mark as completed/failed
- Bulk retry failed tasks
Use Cases:
- Optimization workflow
- Error recovery
Site & Sector Management
Site
- Bulk activate/deactivate
- Bulk update settings (Form: JSON settings)
- Bulk soft delete
Use Cases:
- Site management
- Configuration updates
Sector
- Bulk activate/deactivate
- Bulk soft delete
Use Cases:
- Sector management
- Multi-tenant organization
Industry & IndustrySector
- Bulk activate/deactivate
- Bulk soft delete
Use Cases:
- Industry taxonomy management
- Sector organization
SeedKeyword
- Bulk approve/reject
- Bulk assign to sector (Form: select sector)
- Bulk soft delete
Use Cases:
- Seed keyword management
- Sector assignments
Best Practices
Selection
- Use filters and search before bulk actions
- Preview selected records count
- Test with small batches first
Form Actions
- Read help text carefully
- Validate input before applying
- Cannot undo after confirmation
Export/Import
- Export before major changes (backup)
- Test imports on staging first
- Review preview before confirming import
Soft Delete
- Prefer soft delete over hard delete
- Maintains audit trails
- Can be recovered if needed
Performance
- Batch operations work efficiently up to 10,000 records
- For larger operations, consider database-level operations
- Monitor query performance with Django Debug Toolbar
Troubleshooting
Action Not Appearing
- Check user permissions
- Verify model admin registration
- Clear browser cache
Import Failures
- Verify file format (CSV/XLSX)
- Check field mappings
- Ensure required fields present
- Validate data types
Form Validation Errors
- Review error messages
- Check required fields
- Verify foreign key references exist
Performance Issues
- Reduce batch size
- Add database indexes
- Use
.select_related()for foreign keys - Consider background task queue for large operations
Security Notes
- Permissions: All actions respect Django's built-in permissions system
- Account Isolation: Multi-tenant actions automatically filter by account
- CSRF Protection: All forms include CSRF tokens
- Audit Logging: Consider enabling Django admin log for all actions
- Soft Deletes: Preserve data integrity and compliance requirements
Quick Action Shortcuts
Most Used Actions
- Content Publishing: Content → Bulk publish to WordPress
- Credit Management: Account → Bulk add credits
- Task Assignment: Tasks → Bulk assign to user
- Invoice Processing: Invoice → Bulk mark as paid
- Automation Control: AutomationConfig → Bulk activate/deactivate
Maintenance Actions
- Log Cleanup: AITaskLog/CreditUsageLog → Delete old logs
- Event Cleanup: SyncEvent → Delete old events
- Run Cleanup: AutomationRun → Delete old runs
- Usage Reset: PlanLimitUsage → Bulk reset usage
Emergency Actions
- Account Suspension: Account → Bulk suspend accounts
- Task Cancellation: Tasks → Bulk cancel tasks
- Publishing Rollback: DeploymentRecord → Bulk rollback
- Integration Disable: SiteIntegration → Bulk deactivate
Last Updated: 2025 IGNY8 Platform - Django Admin Operations Guide