You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/manager.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,29 +14,6 @@ class MyModel:
14
14
15
15
Many of the following examples are also shown in this [Jupyter Notebook](https://github.com/jacebrowning/datafiles/blob/develop/notebooks/manager_api.ipynb).
16
16
17
-
# `all()`
18
-
19
-
Iterate over all objects matching the pattern:
20
-
21
-
```python
22
-
>>> generator = MyModel.objects.all()
23
-
>>>list(generator)
24
-
[]
25
-
```
26
-
27
-
```python
28
-
>>> m1 = MyModel('foo')
29
-
>>> m2 = MyModel('bar', 42)
30
-
```
31
-
32
-
```python
33
-
>>>for m in MyModel.objects.all():
34
-
...print(m)
35
-
...
36
-
MyModel(my_key='foo'my_value=0)
37
-
MyModel(my_key='bar', my_value=42)
38
-
```
39
-
40
17
# `get_or_none()`
41
18
42
19
Instantiate an object from an existing file or return `None` if no matching file exists:
0 commit comments