[Python-modules-commits] [django-organizations] 01/03: import django-organizations_0.8.2.orig.tar.gz

Scott Kitterman kitterman at moszumanska.debian.org
Thu Nov 10 18:02:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

kitterman pushed a commit to branch master
in repository django-organizations.

commit effb99a197ba11ca91c1c72cfc81176b379d4f85
Author: Scott Kitterman <scott at kitterman.com>
Date:   Thu Nov 10 12:31:17 2016 -0500

    import django-organizations_0.8.2.orig.tar.gz
---
 HISTORY.rst                                        | 201 +++++++++
 LICENSE                                            |  23 +
 MANIFEST.in                                        |   6 +
 PKG-INFO                                           | 475 +++++++++++++++++++++
 README.rst                                         | 250 +++++++++++
 django_organizations.egg-info/PKG-INFO             | 475 +++++++++++++++++++++
 django_organizations.egg-info/SOURCES.txt          |  55 +++
 django_organizations.egg-info/dependency_links.txt |   1 +
 django_organizations.egg-info/not-zip-safe         |   1 +
 django_organizations.egg-info/requires.txt         |   1 +
 django_organizations.egg-info/top_level.txt        |   1 +
 organizations/__init__.py                          |  32 ++
 organizations/admin.py                             |  55 +++
 organizations/app_settings.py                      |  38 ++
 organizations/apps.py                              |  31 ++
 organizations/backends/__init__.py                 |  42 ++
 organizations/backends/defaults.py                 | 292 +++++++++++++
 organizations/backends/forms.py                    |  74 ++++
 organizations/backends/tokens.py                   |  71 +++
 organizations/base.py                              | 224 ++++++++++
 organizations/exceptions.py                        |  40 ++
 organizations/fields.py                            |  85 ++++
 organizations/forms.py                             | 162 +++++++
 organizations/managers.py                          |  53 +++
 organizations/migrations/0001_initial.py           |  82 ++++
 organizations/migrations/__init__.py               |   0
 organizations/mixins.py                            | 126 ++++++
 organizations/models.py                            | 209 +++++++++
 organizations/signals.py                           |  33 ++
 .../organizations/email/activation_body.html       |   0
 .../organizations/email/activation_subject.txt     |   0
 .../organizations/email/invitation_body.html       |   7 +
 .../organizations/email/invitation_subject.txt     |   1 +
 .../organizations/email/reminder_body.html         |   7 +
 .../organizations/email/reminder_subject.txt       |   1 +
 organizations/templates/organizations/login.html   |  12 +
 .../organizations/organization_confirm_delete.html |   9 +
 .../organizations/organization_detail.html         |  12 +
 .../templates/organizations/organization_form.html |   8 +
 .../templates/organizations/organization_list.html |  10 +
 .../organizations/organization_users.html          |   8 +
 .../organizationuser_confirm_delete.html           |   8 +
 .../organizations/organizationuser_detail.html     |  13 +
 .../organizations/organizationuser_form.html       |  13 +
 .../organizations/organizationuser_list.html       |   9 +
 .../organizations/organizationuser_remind.html     |   8 +
 .../templates/organizations/register_form.html     |   4 +
 .../templates/organizations/register_success.html  |   1 +
 organizations/templates/organizations_base.html    |   1 +
 organizations/templatetags/__init__.py             |  24 ++
 organizations/templatetags/org_tags.py             |  44 ++
 organizations/urls.py                              |  70 +++
 organizations/utils.py                             |  99 +++++
 organizations/views.py                             | 235 ++++++++++
 setup.cfg                                          |   8 +
 setup.py                                           |  58 +++
 56 files changed, 3808 insertions(+)

diff --git a/HISTORY.rst b/HISTORY.rst
new file mode 100644
index 0000000..1a26966
--- /dev/null
+++ b/HISTORY.rst
@@ -0,0 +1,201 @@
+.. :changelog:
+
+History
+=======
+
+0.8.2
+-----
+
+* Updates setup classifiers information
+
+0.8.1
+-----
+
+* Fixes [lack of] validation bug in backend registration form
+
+0.8.0
+-----
+
+* Adds Django 1.10 support
+
+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
+-----
+
+* Fixes email parsing from settings
+
+0.6.0
+-----
+
+* Adds Django 1.9 support
+* Drops support for Django 1.7
+* Fixes migration issue related to incomplete support for configurable model
+  fields and base model. If you are upgrading (especially from a fork of the
+  development version of django-organization) you may have an extra migration,
+  0002_auto_20151005_1823, which has been removed.
+
+0.5.3
+-----
+
+* Fixes migrations problem in build
+
+0.5.2
+-----
+
+* Fixes packaging bug
+
+0.5.1
+-----
+
+* Cleaned up installation instructions
+
+0.5.0
+-----
+
+* Drops testing support for Django 1.5 and Django 1.6
+* Adds native Django database migrations
+* Adds tested support for Django 1.7 and Django 1.8
+
+0.4.3
+-----
+
+* Adds app specific signals
+
+0.4.2
+-----
+
+* Various related name fixes in models, registration backends
+
+0.4.1
+-----
+
+* Support for older Django versions with outdated versions of `six`
+
+0.4.0
+-----
+
+* Allows for configurable TimeStampModel (base mixin for default Organization
+  model) and AutoSlugField (field on default Organization model).
+
+0.3.0
+-----
+
+* Initial Django 1.7 compatability release
+
+0.2.3
+-----
+
+* Fix issue validating organziation ownership for custom organization models
+  inheriting directly from the `Organization` class.
+
+0.2.2
+-----
+
+* Packaging fix
+
+0.2.1
+-----
+
+* Packaging fix
+
+0.2.0
+-----
+
+* Abstract base models. These allow for custom organization models
+  without relying on mulit-table inheritence, as well as custom
+  organization user models, all on an app-by-app basis.
+
+0.1.10
+------
+
+* Packaging fix
+
+0.1.9
+-----
+
+* Restructures tests to remove from installed module, should reduce installed
+  package size
+
+0.1.8
+-----
+
+* Fixes *another* bug in email invitations
+
+0.1.7
+-----
+
+* Fixes bug in email invitation
+
+0.1.6
+-----
+
+* Extends organizaton name length
+* Increase email field max length
+* Adds `get_or_add_user` method to Organization
+* Email character escaping
+
+0.1.5
+-----
+
+* Use raw ID fields in admin
+* Fixes template variable names
+* Allow superusers access to all organization views
+* Activate related organizations when activating an owner user
+
+0.1.4a
+------
+
+* Bug fix for user model import
+
+0.1.4
+-----
+
+* Bugfixes for deleting organization users
+* Removes additional `auth.User` references in app code
+
+0.1.3b
+------
+
+* Changes SlugField to an AutoSlugField from django-extensions
+* Base models on TimeStampedModel from django-extensions
+* ForeignKey to user model based on configurable user selection
+
+0.1.3
+-----
+
+* Manage organization models with South
+* Added configurable context variable names to view mixins
+* Added a base backend class which the Invitation and Registration backends extend
+* Lengthed Organization name and slug fields
+* Makes mixin model classes configurable
+* Improved admin display
+* Removes initial passwords
+
+0.1.2
+-----
+
+* Added registration backend
+* Various bug fixes
+
+0.1.1
+-----
+
+* Add RequestContext to default invitation registration view
+* Fix invitations
+
+0.1.0
+-----
+
+* Initial alpha application
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..eb805b1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2012-2016, Ben Lopatin and contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.  Redistributions in binary
+form must reproduce the above copyright notice, this list of conditions and the
+following disclaimer in the documentation and/or other materials provided with
+the distribution
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..95bad9e
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,6 @@
+include setup.py
+include README.rst
+include MANIFEST.in
+include HISTORY.rst
+include LICENSE
+recursive-include organizations/templates *
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..15937af
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,475 @@
+Metadata-Version: 1.1
+Name: django-organizations
+Version: 0.8.2
+Summary: Group accounts for Django
+Home-page: https://github.com/bennylope/django-organizations/
+Author: Ben Lopatin
+Author-email: ben at wellfire.co
+License: BSD License
+Description: ====================
+        django-organizations
+        ====================
+        
+        .. start-table
+        
+        .. list-table::
+            :stub-columns: 1
+        
+            * - Summary
+              - Groups and multi-user account management
+            * - Author
+              - Ben Lopatin (http://benlopatin.com / https://wellfire.co)
+            * - Status
+              - |docs| |travis| |version| |wheel| |supported-versions| |supported-implementations|
+        
+        .. |docs| image:: https://readthedocs.org/projects/django-organizations/badge/?style=flat
+            :target: https://readthedocs.org/projects/django-organizations
+            :alt: Documentation Status
+        
+        .. |travis| image:: https://travis-ci.org/bennylope/django-organizations.svg?branch=master
+            :alt: Travis-CI Build Status
+            :target: https://travis-ci.org/bennylope/django-organizations
+        
+        .. |version| image:: https://img.shields.io/pypi/v/django-organizations.svg?style=flat
+            :alt: PyPI Package latest release
+            :target: https://pypi.python.org/pypi/django-organizations
+        
+        .. |wheel| image:: https://img.shields.io/pypi/wheel/django-organizations.svg?style=flat
+            :alt: PyPI Wheel
+            :target: https://pypi.python.org/pypi/django-organizations
+        
+        .. |supported-versions| image:: https://img.shields.io/pypi/pyversions/django-organizations.svg?style=flat
+            :alt: Supported versions
+            :target: https://pypi.python.org/pypi/django-organizations
+        
+        .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/django-organizations.svg?style=flat
+            :alt: Supported implementations
+            :target: https://pypi.python.org/pypi/django-organizations
+        
+        
+        .. end-table
+        
+        
+        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.
+        
+        * Works with your existing user model, whether
+          `django.contrib.auth` or a custom model. No additional user
+          or authentication functionality required.
+        * Users can be belong to and own more than one organization (account, group)
+        * Invitation and registration functionality works out of the box for many
+          situations and can be extended as need to fit specific requirements.
+        * Start with the base models or use your own for greater customization.
+        
+        Documentation is on `Read the Docs
+        <http://django-organizations.readthedocs.org/en/latest/index.html>`_
+        
+        Installing
+        ==========
+        
+        First add the application to your Python path. The easiest way is to use
+        `pip`::
+        
+            pip install django-organizations
+        
+        You can also install by downloading the source and running::
+        
+            $ python setup.py install
+        
+        By default you will need to install `django-extensions` or comparable libraries
+        if you plan on adding Django Organizations as an installed app to your Django
+        project. See below on configuring.
+        
+        Configuring
+        -----------
+        
+        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 = [
+                ...
+                url(r'^accounts/', include('organizations.urls')),
+                url(r'^invitations/', include(invitation_backend().get_urls())),
+            ]
+        
+        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 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'
+        
+        Alternative::
+        
+            ORGS_SLUGFIELD = 'autoslug.fields.AutoSlugField'
+        
+        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/>`_
+        
+        Registration & invitation backends
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        
+        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'
+        
+        
+        Usage Overview
+        ==============
+        
+        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:
+        
+        * **Organization** The group object. This is what you would associate your own
+          app's functionality with, e.g. subscriptions, repositories, projects, etc.
+        * **OrganizationUser** A custom `through` model for the ManyToMany relationship
+          between the `Organization` model and the `User` model. It stores additional
+          information about the user specific to the organization and provides a
+          convenient link for organization ownership.
+        * **OrganizationOwner** The user with rights over the life and death of the
+          organization. This is a one to one relationship with the `OrganizationUser`
+          model. This allows `User` objects to own multiple organizations and makes it
+          easy to enforce ownership from within the organization's membership.
+        
+        The underlying organizations API is simple::
+        
+            >>> from organizations.utils import create_organization
+            >>> chris = User.objects.get(username="chris")
+            >>> soundgarden = create_organization(chris, "Soundgarden", org_user_defaults={'is_admin': True})
+            >>> 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>
+        
+        Custom models
+        -------------
+        
+        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
+        <http://django-organizations.readthedocs.org/en/latest/cookbook.html#advanced-customization>`_
+        section in the documentation for advice on proceeding.
+        
+        Development & Contributing
+        ==========================
+        
+        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:
+        
+        * Improving the tests and test coverage (ideally moving them back out of the
+          main module and executable using the setup.py file)
+        * Improving the backends and backends concept so that additional invitation and
+          registration backends can be used
+        * Documentation
+        * Ensuring all application text is translatable
+        * Python 3 readiness
+        
+        Please use the project's issues tracker to report bugs, doc updates, or other
+        requests/suggestions.
+        
+        Targets & testing
+        -----------------
+        
+        The codebase is targeted and tested against:
+        
+        * Django 1.8.x against Python 2.7, 3.4, 3.5, and PyPy
+        * Django 1.9.x against Python 2.7, 3.4, 3.5, and PyPy
+        * Django 1.10.x against Python 2.7, 3.4, 3.5, and PyPy
+        
+        To run the tests against all target environments, install `tox
+        <https://testrun.org/tox/latest/>`_ and then execute the command:
+        
+            tox
+        
+        Submitting
+        ----------
+        
+        These submission guidelines will make it more likely your submissions will be
+        reviewed and make it into the project:
+        
+        * Ensure they match the project goals and are sufficiently generalized
+        * Please try to follow `Django coding style
+          <https://docs.djangoproject.com/en/1.8/internals/contributing/writing-code/coding-style/>`_.
+          The code base style isn't all up to par, but I'd like it to move in that
+          direction
+        * Also please try to include `good commit log messages
+          <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>`_.
+        * Pull requests should include an amount of code and commits that are
+          reasonable to review, are **logically grouped**, and based off clean feature
+          branches.
+        
+        Code contributions are expected to pass in all target environments, and
+        pull requests should be made from branches with passing builds on `Travis
+        CI <https://travis-ci.org/bennylope/django-organizations>`_.
+        
+        Project goals
+        -------------
+        
+        django-organizations should be backend agnostic:
+        
+        1. Authentication agnostic
+        2. Registration agnostic
+        3. Invitation agnostic
+        4. User messaging agnostic
+        
+        Etc.
+        
+        License
+        =======
+        
+        Anyone is free to use or modify this software under the terms of the BSD
+        license.
+        
+        
+        
+        
+        History
+        =======
+        
+        0.8.2
+        -----
+        
+        * Updates setup classifiers information
+        
+        0.8.1
+        -----
+        
+        * Fixes [lack of] validation bug in backend registration form
+        
+        0.8.0
+        -----
+        
+        * Adds Django 1.10 support
+        
+        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
+        -----
+        
+        * Fixes email parsing from settings
+        
+        0.6.0
+        -----
+        
+        * Adds Django 1.9 support
+        * Drops support for Django 1.7
+        * Fixes migration issue related to incomplete support for configurable model
+          fields and base model. If you are upgrading (especially from a fork of the
+          development version of django-organization) you may have an extra migration,
+          0002_auto_20151005_1823, which has been removed.
+        
+        0.5.3
+        -----
+        
+        * Fixes migrations problem in build
+        
+        0.5.2
+        -----
+        
+        * Fixes packaging bug
+        
+        0.5.1
+        -----
+        
+        * Cleaned up installation instructions
+        
+        0.5.0
+        -----
+        
+        * Drops testing support for Django 1.5 and Django 1.6
+        * Adds native Django database migrations
+        * Adds tested support for Django 1.7 and Django 1.8
+        
+        0.4.3
+        -----
+        
+        * Adds app specific signals
+        
+        0.4.2
+        -----
+        
+        * Various related name fixes in models, registration backends
+        
+        0.4.1
+        -----
+        
+        * Support for older Django versions with outdated versions of `six`
+        
+        0.4.0
+        -----
+        
+        * Allows for configurable TimeStampModel (base mixin for default Organization
+          model) and AutoSlugField (field on default Organization model).
+        
+        0.3.0
+        -----
+        
+        * Initial Django 1.7 compatability release
+        
+        0.2.3
+        -----
+        
+        * Fix issue validating organziation ownership for custom organization models
+          inheriting directly from the `Organization` class.
+        
+        0.2.2
+        -----
+        
+        * Packaging fix
+        
+        0.2.1
+        -----
+        
+        * Packaging fix
+        
+        0.2.0
+        -----
+        
+        * Abstract base models. These allow for custom organization models
+          without relying on mulit-table inheritence, as well as custom
+          organization user models, all on an app-by-app basis.
+        
+        0.1.10
+        ------
+        
+        * Packaging fix
+        
+        0.1.9
+        -----
+        
+        * Restructures tests to remove from installed module, should reduce installed
+          package size
+        
+        0.1.8
+        -----
+        
+        * Fixes *another* bug in email invitations
+        
+        0.1.7
+        -----
+        
+        * Fixes bug in email invitation
+        
+        0.1.6
+        -----
+        
+        * Extends organizaton name length
+        * Increase email field max length
+        * Adds `get_or_add_user` method to Organization
+        * Email character escaping
+        
+        0.1.5
+        -----
+        
+        * Use raw ID fields in admin
+        * Fixes template variable names
+        * Allow superusers access to all organization views
+        * Activate related organizations when activating an owner user
+        
+        0.1.4a
+        ------
+        
+        * Bug fix for user model import
+        
+        0.1.4
+        -----
+        
+        * Bugfixes for deleting organization users
+        * Removes additional `auth.User` references in app code
+        
+        0.1.3b
+        ------
+        
+        * Changes SlugField to an AutoSlugField from django-extensions
+        * Base models on TimeStampedModel from django-extensions
+        * ForeignKey to user model based on configurable user selection
+        
+        0.1.3
+        -----
+        
+        * Manage organization models with South
+        * Added configurable context variable names to view mixins
+        * Added a base backend class which the Invitation and Registration backends extend
+        * Lengthed Organization name and slug fields
+        * Makes mixin model classes configurable
+        * Improved admin display
+        * Removes initial passwords
+        
+        0.1.2
+        -----
+        
+        * Added registration backend
+        * Various bug fixes
+        
+        0.1.1
+        -----
+        
+        * Add RequestContext to default invitation registration view
+        * Fix invitations
+        
+        0.1.0
+        -----
+        
+        * Initial alpha application
+        
+Platform: OS Independent
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Framework :: Django
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..833c66b
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,250 @@
+====================
+django-organizations
+====================
+
+.. start-table
+
+.. list-table::
+    :stub-columns: 1
+
+    * - Summary
+      - Groups and multi-user account management
+    * - Author
+      - Ben Lopatin (http://benlopatin.com / https://wellfire.co)
+    * - Status
+      - |docs| |travis| |version| |wheel| |supported-versions| |supported-implementations|
+
+.. |docs| image:: https://readthedocs.org/projects/django-organizations/badge/?style=flat
+    :target: https://readthedocs.org/projects/django-organizations
+    :alt: Documentation Status
+
+.. |travis| image:: https://travis-ci.org/bennylope/django-organizations.svg?branch=master
+    :alt: Travis-CI Build Status
+    :target: https://travis-ci.org/bennylope/django-organizations
+
+.. |version| image:: https://img.shields.io/pypi/v/django-organizations.svg?style=flat
+    :alt: PyPI Package latest release
+    :target: https://pypi.python.org/pypi/django-organizations
+
+.. |wheel| image:: https://img.shields.io/pypi/wheel/django-organizations.svg?style=flat
+    :alt: PyPI Wheel
+    :target: https://pypi.python.org/pypi/django-organizations
+
+.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/django-organizations.svg?style=flat
+    :alt: Supported versions
+    :target: https://pypi.python.org/pypi/django-organizations
+
+.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/django-organizations.svg?style=flat
+    :alt: Supported implementations
+    :target: https://pypi.python.org/pypi/django-organizations
+
+
+.. end-table
+
+
+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.
+
+* Works with your existing user model, whether
+  `django.contrib.auth` or a custom model. No additional user
+  or authentication functionality required.
+* Users can be belong to and own more than one organization (account, group)
+* Invitation and registration functionality works out of the box for many
+  situations and can be extended as need to fit specific requirements.
+* Start with the base models or use your own for greater customization.
+
+Documentation is on `Read the Docs
+<http://django-organizations.readthedocs.org/en/latest/index.html>`_
+
+Installing
+==========
+
+First add the application to your Python path. The easiest way is to use
+`pip`::
+
+    pip install django-organizations
+
+You can also install by downloading the source and running::
+
+    $ python setup.py install
+
+By default you will need to install `django-extensions` or comparable libraries
+if you plan on adding Django Organizations as an installed app to your Django
+project. See below on configuring.
+
+Configuring
+-----------
+
+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 = [
+        ...
+        url(r'^accounts/', include('organizations.urls')),
+        url(r'^invitations/', include(invitation_backend().get_urls())),
+    ]
+
+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 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'
+
+Alternative::
+
+    ORGS_SLUGFIELD = 'autoslug.fields.AutoSlugField'
+
+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/>`_
+
+Registration & invitation backends
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+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'
+
+
+Usage Overview
+==============
+
+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:
+
+* **Organization** The group object. This is what you would associate your own
+  app's functionality with, e.g. subscriptions, repositories, projects, etc.
+* **OrganizationUser** A custom `through` model for the ManyToMany relationship
+  between the `Organization` model and the `User` model. It stores additional
+  information about the user specific to the organization and provides a
+  convenient link for organization ownership.
+* **OrganizationOwner** The user with rights over the life and death of the
+  organization. This is a one to one relationship with the `OrganizationUser`
+  model. This allows `User` objects to own multiple organizations and makes it
+  easy to enforce ownership from within the organization's membership.
+
+The underlying organizations API is simple::
+
+    >>> from organizations.utils import create_organization
+    >>> chris = User.objects.get(username="chris")
+    >>> soundgarden = create_organization(chris, "Soundgarden", org_user_defaults={'is_admin': True})
+    >>> 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>
+
+Custom models
+-------------
+
+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
+<http://django-organizations.readthedocs.org/en/latest/cookbook.html#advanced-customization>`_
+section in the documentation for advice on proceeding.
+
+Development & Contributing
+==========================
+
+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:
+
+* Improving the tests and test coverage (ideally moving them back out of the
+  main module and executable using the setup.py file)
+* Improving the backends and backends concept so that additional invitation and
+  registration backends can be used
+* Documentation
+* Ensuring all application text is translatable
+* Python 3 readiness
+
+Please use the project's issues tracker to report bugs, doc updates, or other
+requests/suggestions.
+
+Targets & testing
+-----------------
+
... 3201 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-organizations.git



More information about the Python-modules-commits mailing list