Skip to content

Commit

Permalink
Update spacing on multiline example
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed May 21, 2019
1 parent c325a22 commit 99f2e2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/orm.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Iterate over all objects matching the pattern:
```python
>>> for m in MyModel.objects.all():
... print(m)
...
MyModel(my_key='foo' my_value=0)
MyModel(my_key='bar', my_value=42)
```
Expand Down Expand Up @@ -55,15 +56,15 @@ MyModel(my_key='foobar', my_value=42)
Instantiate an object from an existing file or create one if no matching file exists:

```python
>>> m = MyModel('foobar', 42)
>>> m = MyModel('foo', 42)
```

```python
>>> MyModel.objects.get_or_create('foobar')
MyModel(my_key='foobar', my_value=42)
>>> MyModel.objects.get_or_create('foo')
MyModel(my_key='foo', my_value=42)
```

```python
>>> MyModel.objects.get_or_create('new')
MyModel(my_key='new', my_value=0)
>>> MyModel.objects.get_or_create('bar')
MyModel(my_key='bar', my_value=0)
```

0 comments on commit 99f2e2b

Please sign in to comment.