Skip to content

Commit

Permalink
Minor documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Smith committed Nov 29, 2016
1 parent 49d7174 commit c22a3c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions staticmodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
... CAT = 'Fluffy', "Man's gracious overlord", True
>>>
The entire collection of members can be retrieved with the :py:meth:`members.all` method.
The entire collection of members can be retrieved with the ``members.all()`` method.
>>> from pprint import pprint as pp
>>>
Expand All @@ -46,13 +46,13 @@
**NOTE:** These methods return generators:
- :py:meth:`members.all`
- :py:meth:`members.filter`
- :py:meth:`members.values`
- :py:meth:`members.values_list`
- ``members.all()``
- ``members.filter()``
- ``members.values()``
- ``members.values_list()``
For demonstration purposes in all of these examples, we consume
those generators with :py:func:`list`.
those generators with ``list()``.
**********
Sub-models
Expand Down Expand Up @@ -110,13 +110,13 @@
Member access methods
*********************
A model member may be retrieved using the model's :py:meth:``members.get`` method.
A model member may be retrieved using the model's ``members.get()`` method.
>>> WildAnimal.members.get(name='Bambi')
<WildAnimal.DEER: name='Bambi', description='Likes to hide', domesticated=False>
>>>
Model members may be filtered with the model's :py:meth:``members.filter`` method.
Model members may be filtered with the model's ``members.filter()`` method.
>>> pp(list(Animal.members.filter(domesticated=True)))
[<Animal.DOG: name='Spot', description="Man's best friend", domesticated=True>,
Expand Down
2 changes: 1 addition & 1 deletion staticmodel/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
``static_model._field_names``.
* ``display_field_name``: The static model field name whose value will
be used as the display value in the ``choices`` passed to the parent
field. Default to the value of ``value_field_name``.
field. Defaults to the value of ``value_field_name``.
When the model field is instantiated, it validates the values of
``value_field_name`` and ``display_field_name`` against
Expand Down

0 comments on commit c22a3c9

Please sign in to comment.