From 1000fb1727ea4fc665fd202abfbea23064a3a5ab Mon Sep 17 00:00:00 2001 From: Ben Lopatin Date: Fri, 6 Jun 2014 14:10:27 -0400 Subject: [PATCH] Version bump --- README.rst | 2 +- docs/conf.py | 4 ++-- docs/getting_started.rst | 34 +++++++++++++++++++++++++++++++++- requirements-test.txt | 3 +++ setup.py | 1 - 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 0c137723..e4af700a 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ django-organizations ==================== :Info: Groups and multi-user account management -:Version: 0.3.0 +:Version: 0.4.0 :Author: Ben Lopatin (http://benlopatin.com) .. image:: https://secure.travis-ci.org/wellfire/django-organizations.png?branch=master diff --git a/docs/conf.py b/docs/conf.py index e257c54f..d56aa0f9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.3' +version = '0.4' # The full version, including alpha/beta/rc tags. -release = '0.3.0' +release = '0.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 2b7646d8..fccf9f58 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -53,6 +53,9 @@ You can specify a different model in your settings using the You can use this setting to configure a custom user model or to refer to a profile model if your project is using Django 1.4. +URLs +---- + If you plan on using the default URLs, hook the application URLs into your main application URL configuration in `urls.py`. If you plan on using the invitation/registration system, set your backend URLs, too:: @@ -64,11 +67,40 @@ invitation/registration system, set your backend URLs, too:: url(r'^invitations/', include(invitation_backend().get_urls())), ) +Registration & invitation +------------------------- + You can specify a different :ref:`invitation backend ` in your project settings, and the `invitation_backend` function will provide the -URLs defined by that backend:: +URLs defined by that backend. You can do the same with the +:ref:`registration backend `:: ORGS_INVITATION_BACKEND = 'myapp.backends.MyInvitationBackend' + ORGS_REGISTRATION_BACKEND = 'myapp.backends.MyRegistrationBackend' + +Timestamp model and slug field +------------------------------ + +Historically Django-Organizations relied on `django-extensions +`_ for the base +`TimeStampedModel +`_ +and `AutoSlugField +`_. +While these work great, this does require that every project install +django-extensions for two small features. + +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:: + + 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 +must accept the `populate_from` keyword argument. Users and multi-account membership ================================== diff --git a/requirements-test.txt b/requirements-test.txt index 39e9bb3d..38b01696 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -3,3 +3,6 @@ coverage mock>=1.0.1 nose>=1.3.0 django-nose>=1.2 + +# Required to test default models +django-extensions>=0.9 diff --git a/setup.py b/setup.py index 0879b137..5e7aa6f4 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,6 @@ ], install_requires=[ 'Django>=1.4.2,<1.8', - 'django-extensions>=0.9', ], test_suite='tests', include_package_data=True,