Skip to content

Commit

Permalink
Documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
karanlyons committed Oct 3, 2013
1 parent 055a5f3 commit 389b556
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ new properties and methods for tracking and manually reverting changes to your
model before you save it.

You can also use :class:`~save_the_change.mixins.UpdateTogetherModel` in place of
:class:`~django.db.models.Model` to add the new field `update_together` to your
model's `Meta`, which allows you to specify that certain fields are dependent on
:class:`~django.db.models.Model` to add the new field ``update_together`` to your
model's ``Meta``, which allows you to specify that certain fields are dependent on
the values of other fields in your model.


Expand All @@ -125,5 +125,7 @@ Developer Interface
.. autoclass:: save_the_change.mixins.BaseChangeTracker
:members: __setattr__, save

.. autoclass:: save_the_change.mixins.UpdateTogetherMeta


.. include:: ../HISTORY.rst
14 changes: 7 additions & 7 deletions save_the_change/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ def revert_fields(self, fields=None):

class UpdateTogetherMeta(models.base.ModelBase):
"""
A metaclass that hides our added `update_together` attribute from the
instance's :class:`~django.db.models.Model.Meta`, since otherwise Django's
fascistic Meta options sanitizer will throw an exception.
A metaclass that hides our added ``update_together`` attribute from the
instance's ``Meta``, since otherwise Django's fascistic Meta options
sanitizer will throw an exception.
(If you have another mixin that adds to your model's
:class:`~django.db.models.Model.Meta`, create a `metaclass` that inherits
from both this and the other mixin's `metaclass`.)
(If you have another mixin that adds to your model's ``Meta``, create a
``metaclass`` that inherits from both this and the other
mixin's ``metaclass``.)
"""

Expand Down Expand Up @@ -258,7 +258,7 @@ def __new__(cls, name, bases, attrs):
class UpdateTogetherModel(BaseChangeTracker, models.Model, six.with_metaclass(UpdateTogetherMeta)):
"""
A replacement for :class:`~django.db.models.Model` which allows you to
specify the `Meta` attribute `update_fields`: a
specify the ``Meta`` attribute ``update_together``: a
:py:obj:`list`/:py:obj:`tuple` of :py:obj:`list`\s/:py:obj:`tuple`\s
defining fields that should always be updated together if any of
them change.
Expand Down

0 comments on commit 389b556

Please sign in to comment.