Skip to content

Commit

Permalink
docs: add missing period and capitalize where appropriate (#1653)
Browse files Browse the repository at this point in the history
  • Loading branch information
frjonsen committed Jun 23, 2020
1 parent 0cee311 commit 97b6b46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/usage/models.md
Expand Up @@ -37,20 +37,20 @@ if no `ValidationError` is raised, you know the resulting model instance is vali
```py
assert user.id == 123
```
fields of a model can be accessed as normal attributes of the user object
the string '123' has been cast to an int as per the field type
Fields of a model can be accessed as normal attributes of the user object.
The string '123' has been cast to an int as per the field type
```py
assert user.name == 'Jane Doe'
```
name wasn't set when user was initialised, so it has the default value
`name` wasn't set when user was initialised, so it has the default value
```py
assert user.__fields_set__ == {'id'}
```
the fields which were supplied when user was initialised:
The fields which were supplied when user was initialised:
```py
assert user.dict() == dict(user) == {'id': 123, 'name': 'Jane Doe'}
```
either `.dict()` or `dict(user)` will provide a dict of fields, but `.dict()` can take numerous other arguments.
Either `.dict()` or `dict(user)` will provide a dict of fields, but `.dict()` can take numerous other arguments.
```py
user.id = 321
assert user.id == 321
Expand Down

0 comments on commit 97b6b46

Please sign in to comment.