Commands - Gary-Community-Ventures/benefits-api GitHub Wiki
This document lists frequently used commands to assist developers. Additional commands can be found under the Validations page.
The add_config
command updates or creates configuration data for one or more white labels in the database.
python manage.py add_config <[--all] | [white_label ...]>
-
Update all white labels:
python manage.py add_config --all
-
Update specific white labels:
python manage.py add_config co
python manage.py add_config nc
python manage.py add_config co nc
-
-a
or--all
: Update configurations for all white labels. -
[white_label ...]
: Specify one or more white labels to update (e.g., co, nc).
The pull_screen
command allows you to fetch screen input from another environment into your development environment.
python manage.py pull_screen <domain_of_environment> <uuid>
-
domain_of_environment
: The domain of the Django admin for the environment you want to pull from. Do not include a trailing slash. -
uuid
: The unique identifier from the URL.
python manage.py pull_screen https://example.com 12341234-1234-1234-1234-123412341234
-
If the
DEV_API_KEY
field is not set in your.env
file, you will be prompted to enter an API key manually. -
The API key must have access to the screen endpoint in the target environment.
-
To avoid entering the API key repeatedly, add
DEV_API_KEY
to your.env
file.
-
--no-bypass
: Do not use the environment variable for the API key; prompt for it instead. Use this flag when pulling from a different environment without changing theDEV_API_KEY
value.
python manage.py pull_screen https://example.com 12341234-1234-1234-1234-123412341234 --no-bypass
The transfer
command copies programs and their translations from one white label (state) to another.
python manage.py transfer <target_state> <name_abbreviated> [additional_name_abbreviated...]
-
target_state
: The target state code (white label) to transfer programs to. -
name_abbreviated
: The abbreviated name of the program to copy. -
[additional_name_abbreviated...]
: (Optional) Additional program names to copy.
-
Transfer a single program:
python manage.py transfer ma ssi
-
ma
: Target white label (Massachusetts). -
ssi
: Supplemental Security Income program.
-
-
Transfer multiple programs:
python manage.py transfer ma ssi ctc
-
ma
: Target white label (Massachusetts). -
ssi
: Supplemental Security Income program. -
ctc
: Child Tax Credit program.
-
- This command ensures that all associated translations for the programs are included in the transfer.
- The programs in the source and target white labels share the same abbreviated names.