Skip to content

Commit

Permalink
Update docs and history for release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bennylope committed Apr 4, 2016
1 parent 1a60316 commit e03e125
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
13 changes: 13 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
History
=======

0.7.0
-----

Fixes some issues which may require some users to clear out extraneous
migrations produced by using configurable base classes.

* Fixes condition where `create_organization` produces an owner who is not an
admin user.
* Fixes issue in slug field import resulting in spurious migrations.
* Immediately deprecates configurable TimeStampedModel import. This caused
serious problems with Django's migration library which were not easily
resolved for a feature that added little value.

0.6.1
-----

Expand Down
22 changes: 11 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ django-organizations
====================

:Info: Groups and multi-user account management
:Version: 0.6.0
:Version: 0.7.0
:Author: Ben Lopatin (http://benlopatin.com)

.. image:: https://secure.travis-ci.org/bennylope/django-organizations.svg?branch=master
Expand Down Expand Up @@ -74,26 +74,26 @@ main application URL conf as well as your chosen invitation backend URLs::
url(r'^invitations/', include(invitation_backend().get_urls())),
)

Timestamped models and auto slug fields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Auto slug field
~~~~~~~~~~~~~~~

The standard way of using Django Organizations is to use it as an installed app
in your Django project. Django Organizations will need to use a
`TimeStampedModel` and an auto slug field which are not included. By default it
will try to import these from django-extensions, but you can configure your own
in settings. The defaults::
in your Django project. Django Organizations will need to use an auto slug
field which are not included. By default it will try to import these from
django-extensions, but you can configure your own in settings. The default::

ORGS_SLUGFIELD = 'django_extensions.db.fields.AutoSlugField'
ORGS_TIMESTAMPED_MODEL = 'django_extensions.db.models.TimeStampedModel'

Alternatives::
Alternative::

ORGS_SLUGFIELD = 'autoslug.fields.AutoSlugField'
ORGS_TIMESTAMPED_MODEL = 'model_utils.models.TimeStampedModels'

Previous versions allowed you to specify an `ORGS_TIMESTAMPED_MODEL` path. This
is now ignored and the functionality satisifed by a vendored solution. A
warning will be given but this *should not* have any effect on your code.

- `django-extensions <http://django-extensions.readthedocs.org/en/latest/>`_
- `Django Autoslug <https://pythonhosted.org/django-autoslug/>`_
- `django-model-utils <https://django-model-utils.readthedocs.org/en/latest/>`_

Registration & invitation backends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '0.6'
version = '0.7'
# The full version, including alpha/beta/rc tags.
release = '0.6.1'
release = '0.7.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
21 changes: 9 additions & 12 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,25 @@ URLs defined by that backend. You can do the same with the
ORGS_INVITATION_BACKEND = 'myapp.backends.MyInvitationBackend'
ORGS_REGISTRATION_BACKEND = 'myapp.backends.MyRegistrationBackend'

Timestamp model and slug field
------------------------------
Auto slug field
---------------

Historically Django-Organizations relied on `django-extensions
<http://django-extensions.readthedocs.org/en/latest/>`_ for the base
`TimeStampedModel
<http://django-extensions.readthedocs.org/en/latest/model_extensions.html>`_
and `AutoSlugField
`AutoSlugField
<http://django-extensions.readthedocs.org/en/latest/field_extensions.html>`_.
While these work great, this does require that every project install
django-extensions for two small features.
While django-extensions is great, this does require that every project install
django-extensions for this one small feature.

If you decide to use the default django-organization models by adding
`organizations` to your INSTALLED_APPS, you can choose a different
TimeStampedModel base and AutoSlugField. Just specify the full dotted path like so::
AutoSlugField. Just specify the full dotted path like so::

ORGS_SLUGFIELD = 'django_extensions.db.fields.AutoSlugField'
ORGS_TIMESTAMPED_MODEL = 'django_extensions.db.models.TimeStampedModel'

While you can specify the source of these classes, **their interfaces must be
consistent.** The TimeStampedModel should have two timestamp fields
(`DateTimeField`) named `created` and `modified`, respectively. The SlugField
While you can specify the source of this class, **its interfaces must be
consistent**, including keyword arguments. Otherwise you will end up generating
extraneous and possibly conflicting migrations in your own app. The SlugField
must accept the `populate_from` keyword argument.

Users and multi-account membership
Expand Down

0 comments on commit e03e125

Please sign in to comment.