Management commands
Run inside the stack with docker compose exec django python manage.py <command>, or on the host with .venv\Scripts\python.exe manage.py <command>. Most accept --help.
warning
Several of these are destructive (truncate, delete_user, delete_bible, reset_collections). They run against whatever DB_HOST points at, which in dev is the shared database.
Data and curriculum (EMAW/management/commands/)
| Command | Purpose |
|---|---|
import_data | Upsert books, weeks, questions, quiet times and memory verses from book_info.json |
export_data | Write front_end_book_info.json for the clients |
truncate | Destructive reset of the curriculum tables |
Users and accounts
| Command | Purpose |
|---|---|
activate_user --user <id> | Mark a user active (skip verification) |
delete_user | Delete a user and their data by email |
migrate_users | Convert usernames to hashed emails (historical) |
purge_pending_accounts | Remove accounts that never verified |
print_users | List users |
test_graph_email | Send a test email through the Graph backend |
Memory verses
| Command | Purpose |
|---|---|
add_119, add_marriage_commitment_all, add_wwwamap | Add a specific verse for all users |
assign_verses | Set MemoryVerse.book |
backfill_umv_from_collections | Create missing UserMemoryVerse rows |
bulk_update_verses | Bulk-edit verse content and hash |
create_collections / reset_collections | Create or reset default collections |
mark_universal | Mark verses with id below 55 as universal |
update_content_hash, update_versions | Recompute hash and version fields |
Bibles
| Command | App | Purpose |
|---|---|---|
load_bible | EMAW | Load a version into the legacy SQL tables from CSV |
delete_bible | EMAW | Delete a legacy version |
create_version_schema, export_version_list | EMAW | Write the JSON metadata the clients bundle |
print_unique_books, print_versions, update_book_abbreviations | EMAW | Inspection and cleanup |
build_bible_sqlite | bibles | Export SQLite files from the legacy tables |
build_sqlite_from_csv | bibles | Build SQLite directly from media/bibles/*.csv |
register_bible_build | bibles | Create BibleBuild rows and optionally mark them current (what the mobile app's manifest serves) |
embed_bible_verses | bible_search | Generate embeddings with OpenAI into Qdrant |
load_bible_embeddings | bible_search | Load the parquet into Qdrant (first run on every machine) |
CRM
| Command | Purpose |
|---|---|
import_planning_center, import_planning_center_lists, import_planning_center_notes, import_planning_center_activities | Planning Center importers (need PLANNING_CENTER_*; refuse to run after PCO_MIGRATION_COMPLETE=1 without --force). Runbook: docs/PCO_CUTOVER.md |
pco_import_report | Reconciliation report for an import run |
geocode_contacts | Geocode contacts missing coordinates |
link_contacts_to_users | Link contacts to app users by email hash |
backfill_contact_activities | Rebuild the activity timeline |
Store, shipping, Deposco
| Command | App | Purpose |
|---|---|---|
seed_store_catalog | store | Create products from the UltraCart list |
sync_stripe_catalog | store | Push products and prices to Stripe |
import_fulfillment_shipments | store | Import historic shipments for fulfilment-based shipping prices |
rebuild_shipping_rates | store | Recompute ShippingRate / ShippingRegionFactor |
link_orders_to_contacts | store | Link paid orders to CRM contacts |
quote_shipping | shipping | Quote a sample address and items from the CLI |
deposco_check | deposco | Verify credentials and that SKUs exist in Deposco |
deposco_submit_order | deposco | Submit one order by hand |
deposco_sync, deposco_sync_inventory | deposco | Run the beat syncs on demand |
deposco_import_orders, deposco_link_contacts | deposco | Import all-channel order history and link to contacts |
Events, resources, campaigns
| Command | App | Purpose |
|---|---|---|
link_registrations_to_contacts | events | Link paid registrations to contacts |
import_sanity_resources | resources | One-time migration of resources from Sanity |
acs_send_test | campaigns | Send a test email through ACS |
backfill_email_images | campaigns | Register images referenced by templates |