Skip to content

Commit

Permalink
Minor corrections to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklinke committed Nov 23, 2024
1 parent 69bdd59 commit 481800d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
21 changes: 6 additions & 15 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Before installing django-model-info, ensure your environment meets the following
- **Django**: Version 4.2 or higher
- **Dependencies**:
- `rich`: Automatically installed with the package for console output
- `networkx`: Optional, for graphing models
- `pydot`: Optional, for graphing models
- `networkx`: Required if using `modelgraph` command
- `pydot`: Required if using `modelgraph` command

### Installation Methods

Expand All @@ -35,10 +35,10 @@ INSTALLED_APPS = (
```

This will install four new management commands:
- `modelinfo`
- `modelfilters`
- `modelgraph`
- `migrationgraph`
- [modelinfo](https://django-model-info.readthedocs.io/en/latest/modelinfo.html)
- [modelfilters](https://django-model-info.readthedocs.io/en/latest/modelfilters.html)
- [modelgraph](https://django-model-info.readthedocs.io/en/latest/modelgraph.html)
- [migrationgraph](https://django-model-info.readthedocs.io/en/latest/migrationgraph.html)

### Verifying Installation

Expand All @@ -52,12 +52,3 @@ You should see the help text for the `modelinfo` command. If you receive an erro
1. The package is installed (`pip list | grep django-model-info`)
2. The app is properly added to `INSTALLED_APPS`
3. Your virtual environment is activated (if using one)

## Next Steps

For usage information specific to each command, please see that command's usage page:

- [modelinfo](https://django-model-info.readthedocs.io/en/latest/modelinfo.html)
- [modelfilters](https://django-model-info.readthedocs.io/en/latest/modelfilters.html)
- [modelgraph](https://django-model-info.readthedocs.io/en/latest/modelgraph.html)
- [migrationgraph](https://django-model-info.readthedocs.io/en/latest/migrationgraph.html)
8 changes: 4 additions & 4 deletions docs/modelfilters.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ python manage.py modelfilters [options]

- **`--target-field-type`**: Filter by field type
```bash
python manage.py modelfilters sales --field-type DateTimeField
python manage.py modelfilters sales --target-field-type DateTimeField
```

- **`-e, --exclude`**: Exclude specific apps, models, or fields
Expand Down Expand Up @@ -112,7 +112,7 @@ All settings are optional, and should be added as dictionary key-value entries i

## Understanding Output

The command outputs a table with four columns:
The command outputs a table with five columns:

1. **Field Path**: The full path to the field using Django's double-underscore notation
2. **Model**: The model containing the field
Expand Down Expand Up @@ -141,7 +141,7 @@ python manage.py modelfilters auth.User --by-depth

### Filtering by Field Type
```bash
python manage.py modelfilters sales.ShippingAddress --field-type DateTimeField
python manage.py modelfilters sales.ShippingAddress --target-field-type DateTimeField
```

| Field Path | Model | Field Name | Field Type | Models in Path |
Expand Down Expand Up @@ -193,7 +193,7 @@ You can combine multiple filters for precise results:
python manage.py modelfilters \
sales \
--target-model User \
--field-type EmailField \
--target-field-type EmailField \
--max-depth 3 \
--exclude auth
```
Expand Down
4 changes: 2 additions & 2 deletions docs/modelgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ python manage.py modelgraph [options]
- **`-p, --proxy`**: Include proxy models

### Output Options
- **`-f, --format`**: Output format (choices: dot, mermaid, analysis; default: analysis)
- **`-o, --output`**: Output file path (required for dot format, optional for mermaid
- **`-f, --format`**: Output format (choices: `dot`, `mermaid`, `analysis`; default: `analysis`)
- **`-o, --output`**: Output file path (required for `dot` format, optional for `mermaid`)

### Cache Control
- **`--use-cache`**: Use cached results if available
Expand Down

0 comments on commit 481800d

Please sign in to comment.