DjangoPlay — Development Data & DevTools
DjangoPlay provides a dedicated development and data-management toolkit under:
On this page ▾
- 1. Overview
- 5.1 fetch_reference_data
- Behavior
- 6.1 generate_geonames_json
- Important
- 7.1 Global Regions
- 7.2 Country Information
- 7.3 Timezones
- 8.1 Cities
- 8.2 Postal Codes
- 10.1 import_classifications
- 11.1 sync_system_constants
- 12.1 Employees
- 12.2 Members
- 12.3 Development Superuser
- 13.1 sync_businesses
- Important
- 14.1 Finance Data Generator
- 14.2 Finance Reference Data
- 14.3 Finance Identities
- 14.4 Billing Schedules
- 14.5 Invoices
- 19.1 Invalid Regions
- 19.2 Locations
- 20.1 masterscript
- 20.2 MasterScript Options
- Phase 0 — Superuser Bootstrap
- Phase 0.5 — Reference Data Fetch
- Phase 1 — Global Initialization
- 26.1 Command timeout
- 26.2 Available-memory check
- Business Services
- Finance Services
- Location Services
- User Services
- Common Services
- Reference data
- Synthetic data
1. Overview
webapp/devtools/
`The package contains Django management commands and supporting services for:
- Reference-data acquisition
- Reference-data transformation and JSON generation
- Reference-data database imports
- Synthetic business/entity generation
- Finance test-data generation
- Development employee and member generation
- Development-data orchestration
- Data cleanup
- Redis cache refresh
- Permission setup
- Database and application maintenance utilities
The tooling is intended primarily for local development, testing, demonstrations, data preparation, and controlled maintenance.
It is not a production data-management framework.
2. DevTools Architecture
The package follows a command → service architecture.
Management commands are intentionally thin where practical, while the more
substantial generation and import logic lives under devtools/services/.
webapp/devtools/
│
├── management/
│ ├── commands/
│ │ └── Django management commands
│ │
│ └── auxiliary_commands/
│ └── developer / maintenance utilities
│
├── services/
│ ├── business/
│ │ └── synthetic business generation/import
│ │
│ ├── finance/
│ │ └── finance test-data generation
│ │
│ ├── locations/
│ │ └── reference-data generation/import
│ │
│ ├── users/
│ │ └── employee/member generation
│ │
│ ├── validators/
│ │ └── development-data validation
│ │
│ └── common/
│ └── shared generation/import utilities
│
└── tasks.py
└── Redis/cache-oriented background tasks and serializersThe general execution pattern is:
Django manage.py command
│
▼
DevTools Command
│
▼
Generation / Import / Sync Service
│
├── Reference Data
├── Domain Models
├── External Data Files
└── Redis / Celery3. Data Categories
DjangoPlay development data falls into several distinct categories.
| Category | Examples | Origin |
|---|---|---|
| Reference data | Countries, regions, subregions, cities, postal codes, timezones | External/prepared datasets |
| Classification data | ISIC, CPC, HS classifications | UN classification source files |
| Synthetic domain data | Businesses/entities | Generated locally |
| Synthetic finance data | Finance identities, billing schedules, invoices | Generated locally |
| Development users | Employees, members | Generated locally |
| System master data | Roles, departments, statuses, teams, etc. | Application constants |
| Cache data | Location, industry and related cached representations | Generated from database state |
These categories should not be treated as interchangeable.
In particular, reference data is not synthetic application data.
4. Reference-Data Pipeline
Reference-data processing consists of multiple stages.
External / Prepared Source
│
▼
generate_geonames_json
│
▼
Compiled JSON
│
├───────────────┐
│ │
▼ ▼
Local DATA_DIR R2 / Published Dataset
│
▼
fetch_reference_data
│
▼
Local DATA_DIR
│
▼
Import Management Commands
│
▼
DatabaseThere are therefore two different operations:
- Generate/compile source data into JSON
- Import prepared JSON into Django models
They should not be confused.
5. Fetching Published Reference Data
5.1 fetch_reference_data
Downloads published reference-data files from the configured R2-compatible
data source into DATA_DIR.
python manage.py fetch_reference_data --country NZMultiple countries can be requested:
python manage.py fetch_reference_data --country FR,US,JP,INThe command also supports source selection:
python manage.py fetch_reference_data \
--country NZ \
--source cities15000Available sources can be inspected without downloading data:
python manage.py fetch_reference_data --list-sourcesUse --force to download files again when they already exist locally:
python manage.py fetch_reference_data \
--country NZ \
--forceBehavior
The command:
- Loads
~/.dplay/.appdata - Reads
DATA_DIR - Reads
DATA_SOURCE_URL - Retrieves the remote
manifest.json - Resolves the selected compiled-data source
- Downloads global datasets
- Downloads country-specific datasets
- Skips files already present unless
--forceis used
The default compiled-data source is:
cities150006. Generating Reference-Data JSON
6.1 generate_geonames_json
This command converts supported source files into JSON datasets consumed by the Django import commands.
Supported data types include:
regions
subregions
cities
country
timezones
postal_codesGenerate all supported datasets:
python manage.py generate_geonames_json \
--all \
--source geonamesGenerate only cities:
python manage.py generate_geonames_json \
--cities \
--source geonamesGenerate regions:
python manage.py generate_geonames_json \
--regions \
--source geonamesGenerate postal codes:
python manage.py generate_geonames_json \
--postal_codes \
--source geonamesA larger batch size can be supplied for large datasets:
python manage.py generate_geonames_json \
--cities \
--source geonames \
--batch-size 100000The source and destination can also be overridden:
python manage.py generate_geonames_json \
--cities \
--source geonames \
--input-file /path/to/source-file \
--output-dir /path/to/outputImportant
generate_geonames_json is a data-preparation command.
It does not populate Django models directly.
The generated JSON becomes input for the appropriate import commands.
7. Global Reference-Data Imports
7.1 Global Regions
python manage.py import_global_regions \
--datasource geonamesA custom source file can be supplied:
python manage.py import_global_regions \
--region-file /path/to/regions.json \
--datasource GOIThe command imports global-region information into the location domain.
7.2 Country Information
python manage.py import_country_info \
--datasource geonamesCustom files can be supplied:
python manage.py import_country_info \
--datasource geonames \
--country-file /path/to/countries.json \
--phone-postal-file /path/to/phone-postal.jsonThe command populates country information and associates countries with their global regions.
7.3 Timezones
python manage.py import_timezonesA custom JSON file can be supplied:
python manage.py import_timezones \
--file /path/to/timezones.json8. Country Location Imports
8.1 Cities
Cities are imported for a specific country.
python manage.py import_cities \
--datasource geonames \
--country NZThe batch size can be adjusted:
python manage.py import_cities \
--datasource geonames \
--country NZ \
--batch-size 50000The input/output JSON paths can also be overridden:
python manage.py import_cities \
--datasource geonames \
--country NZ \
--input-file /path/to/input.json \
--output-file /path/to/output.json8.2 Postal Codes
Import postal codes for one country:
python manage.py import_postal_codes \
--country NZImport for all supported countries:
python manage.py import_postal_codes \
--allCreate missing Location records while importing:
python manage.py import_postal_codes \
--country NZ \
--create-locationsA custom source file can be supplied:
python manage.py import_postal_codes \
--country NZ \
--postal-file /path/to/postal-codes.jsonBatch size can be adjusted for large datasets:
python manage.py import_postal_codes \
--country NZ \
--batch-size 500009. Country Administrative Categories
The command:
python manage.py sync_country_administrative_categories \
--categories-file /path/to/categories.json \
--country-mapping-file /path/to/country-mapping.jsonseeds and assigns country-specific administrative categories.
Both files are required by the command.
A dry run is available:
python manage.py sync_country_administrative_categories \
--categories-file /path/to/categories.json \
--country-mapping-file /path/to/country-mapping.json \
--dry-run10. Industry Classification Data
10.1 import_classifications
The classification importer supports three classification sources:
| Classification | Target model | Source |
|---|---|---|
| ISIC Rev.5 | Industry |
ISIC_SOURCE |
| CPC Ver.3.0 | CPCCode |
CPC_SOURCE |
| HS 2022 | HSCode |
HS_SOURCE |
Run all configured classification imports:
python manage.py import_classificationsImport only ISIC:
python manage.py import_classifications \
--only isicImport CPC:
python manage.py import_classifications \
--only cpcImport HS:
python manage.py import_classifications \
--only hsMultiple classifications can be selected:
python manage.py import_classifications \
--only isic cpcValidate without database writes:
python manage.py import_classifications \
--dry-runThe importer expects the relevant source paths to be available through the configured environment/data paths.
11. System Master Data
11.1 sync_system_constants
Synchronizes application master data from the constants defined by the application.
The command manages master records including:
- Member status
- Employment status
- Roles
- Departments
- Employee types
- Leave types
- Teams
Run:
python manage.py sync_system_constantsThe operation creates missing records and updates records whose values differ from the application constants.
Team creation depends on the corresponding Department records being available.
12. Development Users
12.1 Employees
Generate employees:
python manage.py create_employees \
--count 10 \
--country INAdditional options include:
--batch-size
--seed
--dry-run
--dp
--with-membersFor example:
python manage.py create_employees \
--count 20 \
--country NZ \
--seed 1234 \
--with-members--dp generates users using @djangoplay.org email addresses.
12.2 Members
Generate members:
python manage.py create_members \
--count 10 \
--country INSupported options include:
--batch-size
--seed
--dry-run
--dpExample:
python manage.py create_members \
--count 20 \
--country NZ \
--seed 123412.3 Development Superuser
The development toolkit also provides:
python manage.py create_superuserOptional values can be supplied explicitly:
python manage.py create_superuser \
--email admin@example.com \
--username admin \
--first_name Admin \
--last_name UserThe command is designed to be idempotent and is also used by masterscript.
13. Synthetic Business / Entity Data
13.1 sync_businesses
sync_businesses is the main synthetic business/entity generation command.
Generate business JSON:
python manage.py sync_businesses \
--country IN \
--generate \
--count 5Generate and import:
python manage.py sync_businesses \
--country IN \
--generate \
--import-data \
--count 5The generation can be deterministic:
python manage.py sync_businesses \
--country IN \
--generate \
--import-data \
--count 5 \
--seed 1234Import an already-generated JSON dataset:
python manage.py sync_businesses \
--country IN \
--import-dataGenerate without writing database changes:
python manage.py sync_businesses \
--country IN \
--generate \
--dry-run \
--count 5Remove generated JSON:
python manage.py sync_businesses \
--country IN \
--cleanup-jsonSoft-delete generated SYNC-* entities:
python manage.py sync_businesses \
--country IN \
--cleanup-generatedOverwrite existing generated/imported data when required:
python manage.py sync_businesses \
--country IN \
--generate \
--import-data \
--overwriteImportant
Generated business data is synthetic development data.
It should not be treated as authoritative business/reference data.
14. Finance Development Data
Finance development data is generated through a set of dedicated commands.
The higher-level command is:
python manage.py generate_finance_dataIt coordinates the finance-generation stages.
14.1 Finance Data Generator
Example:
python manage.py generate_finance_data \
--country IN \
--invoices 50 \
--billing-schedules 10Available controls include:
--country
--invoices
--billing-schedules
--seed
--dry-run
--skip-reference-data
--skip-identities
--skip-billing-schedules
--skip-invoicesThis allows the individual finance-generation stages to be selectively enabled or skipped.
For example, generate finance data without invoices:
python manage.py generate_finance_data \
--country IN \
--billing-schedules 10 \
--skip-invoices14.2 Finance Reference Data
python manage.py seed_finance_reference_data \
--country INThis seeds the finance reference/configuration data required by the finance generation workflow.
An issuing entity can be explicitly selected:
python manage.py seed_finance_reference_data \
--country IN \
--issuing-entity-id 123Dry run:
python manage.py seed_finance_reference_data \
--country IN \
--dry-run14.3 Finance Identities
python manage.py generate_finance_identities \
--country INA deterministic seed can be supplied:
python manage.py generate_finance_identities \
--country IN \
--seed 1234Dry run:
python manage.py generate_finance_identities \
--country IN \
--dry-run14.4 Billing Schedules
python manage.py generate_finance_billing_schedules \
--country IN \
--count 10Deterministic generation:
python manage.py generate_finance_billing_schedules \
--country IN \
--count 10 \
--seed 1234Dry run:
python manage.py generate_finance_billing_schedules \
--country IN \
--count 10 \
--dry-run14.5 Invoices
python manage.py generate_finance_invoices \
--country IN \
--count 50Deterministic generation:
python manage.py generate_finance_invoices \
--country IN \
--count 50 \
--seed 1234Dry run:
python manage.py generate_finance_invoices \
--country IN \
--count 50 \
--dry-run15. Finance Reference Status and Payment Methods
The command:
python manage.py import_status_paymentmethodscreates or updates finance invoice statuses and payment methods.
Process both:
python manage.py import_status_paymentmethods --allProcess only status data:
python manage.py import_status_paymentmethods --statusProcess only payment methods:
python manage.py import_status_paymentmethods --payment_methods16. Location Timezone Synchronization
After location data has been imported, timezone relationships can be updated.
For one country:
python manage.py update_locations_timezones \
--country INFor all countries:
python manage.py update_locations_timezones \
--allBatch size can be controlled:
python manage.py update_locations_timezones \
--country IN \
--batch-size 1000The command requires either --country or --all.
17. Redis Development Cache
Development data is not limited to PostgreSQL.
DjangoPlay also maintains Redis-backed representations used by the application.
The development toolkit provides:
python manage.py refresh_redis_cacheThis command refreshes the relevant cached data after development-data changes.
masterscript also invokes cache refresh as part of its finalization stage.
18. Permissions
The development toolkit includes a permission-granting command.
python manage.py grant_permissions \
--email user@example.com \
--perm app_label.codename \
--allow TruePermissions can also be selected by application/model/action:
python manage.py grant_permissions \
--email user@example.com \
--app entities,locations \
--model entities.entity \
--actions add,change,view \
--allow TrueDry run:
python manage.py grant_permissions \
--email user@example.com \
--perm entities.view_entity \
--allow True \
--dry-runA summary can be requested with:
--summary19. Development Cleanup
Development data can be cleaned using dedicated commands.
19.1 Invalid Regions
python manage.py cleanup_invalid_regionsPreview the operation:
python manage.py cleanup_invalid_regions \
--dry-run19.2 Locations
The development toolkit also contains a country-scoped location deletion command:
python manage.py deletelocations \
--country NZBatch size can be adjusted:
python manage.py deletelocations \
--country NZ \
--batch-size 1000This permanently deletes cities, locations, regions and subregions associated with the specified country.
This is a destructive development-data operation.
20. Master Development-Data Orchestration
20.1 masterscript
masterscript is the primary orchestration command for building a populated
development environment.
A minimal invocation is:
python manage.py masterscript \
--iterations 1 \
--processes 1 \
--country IN \
--count 5The command requires --iterations.
20.2 MasterScript Options
| Option | Default | Purpose |
|---|---|---|
--iterations |
Required | Number of synthetic generation iterations |
--processes |
1 |
Process configuration for country execution; capped at 4 |
--country |
IN |
One or more comma-separated country codes |
--count |
10 |
Entities/invoices generated per country/pass |
--employee-count |
20 |
Employees created during initialization |
--member-count |
20 |
Members created during initialization |
--batch-size |
25000 |
Batch size passed to city import |
--command-timeout |
1800s |
Override command timeout |
--skipglobal |
Off | Skip global initialization |
--force-global |
Off | Force global initialization despite existing data |
--logs |
Off | Write full command trace to masterscript.log |
--min-memory-mb |
150 |
Minimum available memory before launching subprocesses |
21. MasterScript Execution Phases
The current orchestration is divided into the following phases.
Phase 0 — Superuser Bootstrap
create_superuser is always executed.
It is intentionally separate from the global initialization skip mechanism.
create_superuserBecause the command is idempotent, an existing superuser does not need to be
manually handled before running masterscript.
Phase 0.5 — Reference Data Fetch
masterscript automatically ensures that required reference data exists
locally:
fetch_reference_dataThis happens even when --skipglobal is used.
The purpose is to ensure that the subsequent location and business-generation commands have their required JSON datasets available.
Phase 1 — Global Initialization
Unless skipped or automatically detected as already complete, the global initialization stage runs:
sync_system_constants
│
▼
import_classifications
│
▼
import_global_regions
│
▼
import_country_info
│
▼
sync_country_administrative_categories
│
▼
import_timezonesGlobal initialization can be skipped explicitly:
python manage.py masterscript \
--iterations 1 \
--country IN \
--skipglobalAlternatively, masterscript can automatically skip the global phase when
its existing-data checks determine that initialization has already been
completed.
Use:
--force-globalto force the global initialization phase to execute again.
If both are supplied:
--skipglobal
--force-global--skipglobal takes precedence.
22. MasterScript Country Initialization
Country-specific initialization is performed for each requested country.
The current country initialization includes:
create_employees
│
▼
create_members
│
▼
import_cities
│
▼
import_postal_codes
│
▼
sync_businesses
│
▼
generate_finance_dataThe finance initialization stage generates finance supporting/reference data and billing schedules while deliberately skipping invoice generation.
Invoices are generated later during the iteration phase.
23. MasterScript Iterations
Each requested iteration performs:
sync_businesses
│
▼
generate_finance_data
│
└── invoicesDuring the iterative finance stage:
--skip-reference-data
--skip-billing-schedulesare used because those stages have already been handled during country initialization.
The finance stage generates invoices for the entities generated during the current iteration.
24. MasterScript Finalization
After country processing:
update_locations_timezones
│
▼
refresh_redis_cacheThis ensures that location timezone information and Redis-backed application data are synchronized with the newly generated development records.
25. Multiple-Country Execution
Multiple countries can be supplied:
python manage.py masterscript \
--iterations 1 \
--processes 4 \
--country JP,NZ,US,IN \
--count 10When multiple countries are requested, masterscript runs each country as a
separate operating-system process, sequentially.
Conceptually:
MasterScript
│
├── Country JP → child process → complete
│
├── Country NZ → child process → complete
│
├── Country US → child process → complete
│
└── Country IN → child process → completeThe countries are not executed concurrently.
This design limits memory accumulation across large country datasets and allows the operating system to reclaim the memory of each completed child process.
26. Memory and Timeout Protection
masterscript contains explicit protections for resource-constrained
development environments.
26.1 Command timeout
The normal subprocess timeout is:
1800 secondsOverride it with:
--command-timeout 3600Individual multi-country child processes have a larger ceiling because a child runs the complete country workflow.
26.2 Available-memory check
Before launching subprocesses, masterscript checks Linux
/proc/meminfo for MemAvailable.
The default minimum is:
150 MBOverride:
--min-memory-mb 300Disable the check:
--min-memory-mb 0This is a protective mechanism intended to fail cleanly rather than allowing development-data generation to drive a memory-constrained machine into swap thrashing.
27. MasterScript Logging
By default, masterscript keeps console output intentionally quiet.
Use:
python manage.py masterscript \
--iterations 1 \
--country IN \
--count 10 \
--logsWith --logs, the complete per-command trace is written to:
masterscript.logat the repository root.
The log includes:
- Commands executed
- Command output
- Phase information
- Failures
- Final summaries
The console remains intentionally concise.
This is particularly useful when large imports would otherwise produce thousands of lines of terminal output.
28. Recommended Development Workflow
For a new development environment, the recommended conceptual workflow is:
1. Prepare / fetch reference data
│
▼
2. Import global reference data
│
▼
3. Import country location data
│
▼
4. Generate development users
│
▼
5. Generate synthetic businesses
│
▼
6. Generate finance data
│
▼
7. Update location timezones
│
▼
8. Refresh RedisFor normal development, masterscript is the preferred orchestration entry
point because it coordinates these stages and performs the required checks.
Individual commands remain useful when:
- Debugging a specific data pipeline
- Rebuilding only one dataset
- Testing a specific domain generator
- Importing a newly prepared reference dataset
- Cleaning a development environment
- Re-running a failed phase independently
29. Deterministic Development Data
Several generation commands support:
--seedA seed allows developers to make generated data deterministic for repeatable development and testing.
For example:
python manage.py sync_businesses \
--country IN \
--generate \
--import-data \
--count 10 \
--seed 1234Finance generators and user-generation commands also support deterministic seeding.
Deterministic generation is useful when comparing application behavior across runs.
30. Dry-Run Support
Several development-data commands provide:
--dry-runDry-run mode allows the generation/import logic to be exercised without persisting the resulting database changes.
Commands supporting dry-run include, among others:
sync_businesses
create_employees
create_members
generate_finance_data
generate_finance_identities
generate_finance_billing_schedules
generate_finance_invoices
seed_finance_reference_data
grant_permissions
sync_country_administrative_categories
cleanup_invalid_regionsUse dry-run mode whenever evaluating a destructive or high-volume operation before writing to the database.
31. Auxiliary Developer Utilities
devtools/management/auxiliary_commands/ contains utilities that are not part
of the normal development-data generation pipeline.
These include:
| Utility | Purpose |
|---|---|
audit_serializers |
Backfill/prepare audit history data for serializers/models |
backfill_history |
Backfill model history |
check_url_conflicts |
Detect URL pattern conflicts |
cleanup_audit_events |
Remove expired audit events |
clear_policy_caches |
Clear policy-engine Redis caches |
deletelocations |
Permanently remove country location data |
find_bad_drf_field |
Detect serializer/model/view field configuration conflicts |
format_templates |
Reformat Django templates |
generate_schema |
Generate JSON schema for an application's models |
remove_blank_lines |
Remove blank lines from Python source |
table_stats |
Inspect database table counts and columns |
validate_email_templates |
Validate email template syntax and renderability |
These utilities support development and maintenance but should not be confused with the synthetic-data generation pipeline.
32. DevTools Service Organization
The supporting service layer is organized by domain.
Business Services
devtools/services/business/Includes functionality for:
- Business generation
- Business JSON creation
- Business import
- Business persistence
- Business synchronization
- Business cleanup
- Business hierarchy
- Payload construction
- Reporting
- Generation context and counters
Finance Services
devtools/services/finance/Includes:
- Finance generation context
- Finance reference-data handling
- Finance identity generation
- Billing schedule generation
- Invoice generation
- Finance generation orchestration
- Finance constants
Location Services
devtools/services/locations/Includes:
- Global region import
- Country information import
- City import
- Postal-code import
- Timezone import
- Location JSON generation
- Administrative-category synchronization
- Location timezone updates
- Geo-services integration
- Location import validation
- Region-name overrides
User Services
devtools/services/users/Includes:
- Employee generation
- Member generation
Common Services
devtools/services/common/Provides reusable generation/import functionality including:
- Faker support
- Environment/path loading
- Locale generation
- Phone-number utilities
- Postal-code utilities
- Tax identifiers
- Ratio/distribution helpers
- Progress animation
33. Development Data and Application Services
The development-data tooling is intended to exercise the application's real domain structures.
The preferred pattern is:
DevTools Generator
│
▼
Domain Service
│
▼
Domain Model
│
▼
PostgreSQLRather than constructing arbitrary database states directly, generators should create records that satisfy the application's relationships, validation rules, and workflow expectations.
This is particularly important for:
- Business/entity relationships
- Location hierarchy
- Finance identities
- Billing schedules
- Invoices
- User/employee/member relationships
34. Reference Data vs Synthetic Data
The distinction should remain explicit.
Reference data
Examples:
Countries
Regions
Subregions
Cities
Postal codes
Timezones
Industry classificationsReference data comes from prepared external datasets and is imported into the application.
Synthetic data
Examples:
Businesses
Employees
Members
Finance identities
Billing schedules
InvoicesSynthetic data is generated specifically for development and testing.
The two pipelines are complementary:
Reference Data
│
▼
Provides the geographic/classification foundation
│
▼
Synthetic Data
│
▼
Exercises application/domain workflows35. Production Safety
Development-data commands can create, modify, and in some cases permanently delete database records.
They should therefore be treated as development tooling.
In particular, take care with commands such as:
deletelocations
cleanup_invalid_regions
sync_businesses --cleanup-generatedand any command executed against a non-development database.
--dry-run should be preferred when the command supports it and the effect of
an operation is not yet understood.
36. Command Quick Reference
| Command | Purpose |
|---|---|
masterscript |
Full development-data orchestration |
fetch_reference_data |
Download published reference datasets |
generate_geonames_json |
Convert source data to compiled JSON |
import_global_regions |
Import global regions |
import_country_info |
Import country information |
import_timezones |
Import timezone data |
import_cities |
Import city data |
import_postal_codes |
Import postal-code/location data |
import_classifications |
Import ISIC/CPC/HS classifications |
sync_country_administrative_categories |
Seed country administrative categories |
sync_system_constants |
Synchronize application master data |
create_superuser |
Create/ensure development administrator |
create_employees |
Generate employees |
create_members |
Generate members |
sync_businesses |
Generate/import synthetic businesses |
seed_finance_reference_data |
Seed finance reference/configuration data |
generate_finance_data |
Orchestrate finance test-data generation |
generate_finance_identities |
Generate finance identities |
generate_finance_billing_schedules |
Generate billing schedules |
generate_finance_invoices |
Generate invoices |
import_status_paymentmethods |
Synchronize invoice statuses/payment methods |
update_locations_timezones |
Update location timezone relationships |
refresh_redis_cache |
Refresh Redis-backed application data |
grant_permissions |
Grant/revoke development permissions |
cleanup_invalid_regions |
Remove invalid region development data |
deletelocations |
Permanently remove country location data |
37. Summary
DjangoPlay's devtools package is a structured development-data and
maintenance subsystem rather than a single fixture generator.
Its primary responsibilities are:
Reference Data
├── Generate / compile
├── Fetch published datasets
└── Import into Django
Synthetic Data
├── Users / Members / Employees
├── Businesses / Entities
└── Finance / Invoices
Orchestration
└── masterscript
Maintenance
├── Cleanup
├── Permissions
├── Cache refresh
├── Audit utilities
└── Developer diagnosticsFor normal development-data population, use:
python manage.py masterscript \
--iterations 1 \
--processes 1 \
--country IN \
--count 5For specialized work, use the individual management commands directly.
The authoritative implementation of each command is located under:
webapp/devtools/management/commands/with the underlying generation and import logic implemented primarily under:
webapp/devtools/services/