Separate individual user identity from accounts and subscriptions. Django Organizations adds user-managed, multi-user groups to your Django project. Use Django Organizations whether your site needs organizations that function like social groups or multi-user account objects to provide account and subscription functionality beyond the individual user.
Documentation is on Read the Docs
First add the application to your Python path. The easiest way is to use pip:
pip install django-organizations
You should install by downloading the source and running:
$ python setup.py install
If you are using Django<=1.4.10, or >=1.5.0,<1.5.5, you will need to install an up-to-date version of the six package. Previous Django versions included an older version of six with which Django Organizations is incompatible.
If you are using South you must use 1.0. Django Organizations is incompatible with earlier versions of South, as this project uses the south_migrations folder for schema migrations in order to maintain Django 1.7 compatability.
Make sure you have django.contrib.auth installed, and add the organizations application to your INSTALLED_APPS list:
INSTALLED_APPS = ( ... 'django.contrib.auth', 'organizations', )
Then ensure that your project URL conf is updated. You should hook in the main application URL conf as well as your chosen invitation backend URLs:
from organizations.backends import invitation_backend urlpatterns = patterns('', ... url(r'^accounts/', include('organizations.urls')), url(r'^invitations/', include(invitation_backend().get_urls())), )
You can specify a different invitation backend in your project settings, and the invitation_backend function will provide the URLs defined by that backend:
ORGS_INVITATION_BACKEND = 'myapp.backends.MyInvitationBackend'
There is also a lightly tested way to use your own user model, rather than the default auth.User model. Set the AUTH_USER_MODEL setting to the dotted model name of your custom user model, following the procedure in Django 1.5:
AUTH_USER_MODEL = 'myuserapp.MyUser'
For most use cases it should be sufficient to include the app views directly using the default URL conf file. You can customize their functionality or access controls by extending the base views.
There are three models:
The underlying organizations API is simple:
>>> chris = User.objects.get(username="chris") >>> soundgarden = create_organization(chris, "Soundgarden") >>> soundgarden.is_member(chris) True >>> soundgarden.is_admin(chris) True >>> soundgarden.owner.organization_user <OrganizationUser: Chris Cornell> >>> soundgarden.owner.organization_user.user >>> <User: chris> >>> audioslave = create_organization(chris, "Audioslave") >>> tom = User.objects.get(username="tom") >>> audioslave.add_user(tom, is_admin=True) <OrganizationUser: Tom Morello>
Django-organizations can act as a base library (not installed in your project) and used to create unique organization model sets using custom tables. See the Cooking with Django Organizations section in the documentation for advice on proceeding.
Development is on-going. To-do items have been moved to the wiki for the time being.
The basic functionality should not need much extending. Current dev priorities for me and contributors should include:
Please use the project's issues tracker to report bugs, doc updates, or other requests/suggestions.
The codebase is targeted at tested against:
To run the tests against all target environments, install tox and then execute the command:
These submission guidelines will make it more likely your submissions will be reviewed and make it into the project:
Code contributions are expected to pass in all target environments, and pull requests should be made from branches with passing builds on Travis CI.
django-organizations should be backend agnostic:
Anyone is free to use or modify this software under the terms of the BSD license.
|File||Type||Python Version||Uploaded On||Downloads|
|django_organizations-0.4.2-py2.py3-none-any.whl||Wheel||2.7||Oct. 24, 2014||406|
|django-organizations-0.4.2.tar.gz||Source||Oct. 24, 2014||250|
|0.4.2||Oct. 24, 2014|
|0.4.1||July 20, 2014|
|0.4.0||June 6, 2014|
|0.3.0||May 26, 2014|
|0.2.3||May 23, 2014|
|0.2.2||May 21, 2014|
|0.2.1||May 21, 2014|
|0.2.0||May 18, 2014|
|0.1.10||Jan. 25, 2014|
|0.1.9||Jan. 25, 2014|
|0.1.8||July 22, 2013|
|0.1.7||July 22, 2013|
|0.1.6||March 27, 2013|
|0.1.5||Jan. 31, 2013|
|0.1.4||Nov. 5, 2012|
|0.1.4a||Nov. 9, 2012|
|0.1.3||Sept. 15, 2012|
|0.1.3c||Oct. 22, 2012|
|0.1.3b||Oct. 17, 2012|
|0.1.3a||Sept. 22, 2012|
|0.1.2||July 4, 2012|
|0.1.1||May 29, 2012|
|0.1.0||May 28, 2012|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.4a||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.10||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.3c||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.3b||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.3a||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.4.2||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.4.0||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.4.1||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.3.0||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.7||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.6||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.5||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.4||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.3||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.2||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.1||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.0||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.2.0||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.2.1||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.2.2||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.2.3||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.9||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||0.1.8||Release Created|
|Nov. 4, 2014, 1:32 p.m.||django-organizations||Package Created|