Skip to content

Commit

Permalink
Merge pull request #150 from blag/update-readme-and-docs
Browse files Browse the repository at this point in the history
Update README and documentation. Thank you @blag
  • Loading branch information
dominno authored Aug 26, 2016
2 parents 9e44b61 + b5ae7a6 commit 2e313fa
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,49 @@ new version will be saved in moderated_object:
your_model = YourModel.objects.get(pk=1)
your_model.__dict__
{'id': 1, 'description': 'New description'}
Upgrading From Previous Versions of Django ModerationAdmin
----------------------------------------------------------

Upgrading from previous versions of django-moderation will require converting from South migrations to Django 1.7+ migrations.

To do so, you will need to perform the following steps (skip any you have already done):

1. Configure South to use the `migrations-pre17` directory for django-moderation migrations:

.. code-block:: python
SOUTH_MIGRATION_MODULES = {
'moderation': 'moderation.migrations-pre17',
}
2. Use South to migrate up to ``0002`` in the ``migrations-pre17`` directory:

.. code-block:: bash
python manage.py syncdb moderation 0001 # Skip this if already applied
python manage.py syncdb moderation 0002 # Skip this if already applied
3. Fake the first two Django migrations:

.. code-block:: bash
python manage.py migrate moderation 0001 --fake
python manage.py migrate moderation 0002 --fake
4. Use Django to migrate ``0003``:

.. code-block:: bash
python manage.py migrate moderation 0003
5. Finally, remove the settings for South:

.. code-block:: python
SOUTH_MIGRATION_MODULES = {
# 'moderation': 'moderation.migrations-pre17',
}
16 changes: 16 additions & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,20 @@ Added features
- Dropped support for django 1.3
- Added support for ForeignKey relations

0.4.0 (2016-08-25)
------------------

- Updated to support Django 1.7 - 1.9
- Added instructions for switching from South migrations to Django 1.7+ migrations
- Improved filter logic for Django 1.8+ to only create one additional query per queryset, instead of N additional queries (eg: one additional query per object in the querset)
- Renamed model fields to be shorter, less redundant, and more semantically correct
- Modified registry to add a ``moderation_status`` shortcut to registered models
- Added support for moderating multiple objects at once
- Changed model choice fields to use ``Choices`` from django-model-utils
- Deprecated the ``DJANGO_MODERATION_MODERATORS`` setting in favor of ``MODERATION_MODERATORS``, which does the same thing
- Improved default email template formatting
- PEP8 and Flake Fixups
- Internal code and documentation typo fixes
- Bug fixes (specifically, closes #87)


0 comments on commit 2e313fa

Please sign in to comment.