Skip to content

Commit

Permalink
docs: update initial seed data section for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
dmartin4820 authored and fyliu committed Nov 12, 2024
1 parent 7e07358 commit b62f2ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/contributing/howto/create-initial-data-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ It is required that there be data in the first column of the sheet.
- Look for name of the last migration file in `core/data/migrations` directory
- Create a script in the same directory named `<number>_<modelnameinlowercase>_seed.py` with the following contents and
replace `<model in lower case>` and `<name of last script>` with appropriate values:
- Create a script in the same directory named `<number>_<modelname_in_lower_case>_seed.py` with the following contents and
replace `<modelname_in_lower_case>`, `ModelNameInPascalCase`, and `<name of last script>` with appropriate values:
```py
from django.db import migrations
Expand Down Expand Up @@ -132,4 +132,6 @@ It is required that there be data in the first column of the sheet.
operations = [migrations.RunPython(forward, reverse)]
```
In this example `011_author_seed` is the name of the last migration file in `core/data/migrations`. You will also need to update this to the last python file in `core/data/migrations` having the format `xxxx_<modename_in_lower_case>_seed.py`.
[pd-data-spreadsheet]: https://docs.google.com/spreadsheets/d/1x_zZ8JLS2hO-zG0jUocOJmX16jh-DF5dccrd_OEGNZ0/

0 comments on commit b62f2ea

Please sign in to comment.