Skip to content

Commit

Permalink
Add example command lines to show usage
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJCLaw committed Dec 20, 2023
1 parent 7d50fbd commit 219e810
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ Exporting, anonymising, and importing, are all configurable, and

#### Exporting

``` console
$ python manage.py devdata_export [dest] [app_label.ModelName ...]
```

This step allows a sync strategy to persist some data that will be used to
create a new development database. For example, the `QuerySetStrategy` can
export data from a table to a filesystem for later import.
Expand All @@ -124,6 +128,10 @@ step.

#### Importing

``` console
$ python manage.py devdata_import [src]
```

This step is responsible for preparing the database and filling it. If any
exporting strategies have been used those must have run first, or their outputs
must have been downloaded if they are being shared/hosted somewhere.
Expand All @@ -132,6 +140,10 @@ Factory-based strategies generate data during this process.

##### Reset modes

``` console
$ python manage.py devdata_import --reset-mode=$MODE [src]
```

By default any existing database will be removed, ensuring that a fresh database
is created for the imported data. This is expected to be the most common case
for local development, but may not always be suitable.
Expand Down

0 comments on commit 219e810

Please sign in to comment.