Open-source project
bennylope/django-organizations avatar
bennylope/django-organizations

django-organizations for Multi-user Django Accounts

:couple: Multi-user accounts for Django projects

1,364 stars222 forksPythonBSD-2-Clause

At a glance

What is it?
django-organizations adds user-managed organizations, memberships, invitations, and registration flows to an existing Django authentication system. It fits applications that need shared accounts or group membership, while leaving authentication, messaging, and most UI decisions outside the package.
Who is it for?
Adopt django-organizations when a Django application needs multi-user accounts or organization membership without replacing its existing user system. Do not adopt it as a complete authentication, billing, subscription, or messaging solution, because those concerns are outside its stated goals.
Can I use it commercially?
Yes. BSD-2-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 15 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Separate Django Users from Shared Account Membership

django-organizations addresses a specific data-model problem: a site often needs an account or group that can contain several people, even though each person still has an individual Django identity. The README describes organizations as suitable for social groups and for multi-user account objects that support account and subscription functionality beyond one individual user. Users can belong to and own more than one organization, so the package does not force a one-to-one relationship between a person and a shared account.

The package is aimed at developers with an existing Django project, including projects using `django.contrib.auth` or a custom user model. It does not require an additional user or authentication implementation. That boundary matters for applications that already depend on Django sessions, permissions, profile fields, or a custom identity model. The organization layer can sit beside those choices instead of replacing them.

It is also intended for applications whose shared accounts need invitations and registration. The README says invitation and registration functionality works out of the box for many situations and can be extended. That wording is more precise than calling the package turnkey. The default path can cover common cases, but applications with unusual approval rules, tenant provisioning, or membership workflows will still need project-specific code.

The project goals make the scope clear. django-organizations describes itself as backend agnostic for authentication, registration, invitations, and user messaging. It is therefore a membership and organization foundation, not a full account platform. Subscription logic, payment handling, notifications, and authentication policy are not presented as built-in responsibilities.

Concrete Models, Backends, and Django URL Integration

The documented starting point is to install the package as a Django application and use its concrete models. The required settings add `django.contrib.auth` and `organizations` to `INSTALLED_APPS`. URLs then include the main application URL configuration and a selected invitation backend. The documented URL example imports `invitation_backend` from `organizations.backends`, mounts `organizations.urls` under `accounts/`, and mounts the backend URLs under `invitations/`.

That arrangement separates two concerns at the routing layer. Organization and account views are handled by the package's main URL module. Invitation handling is selected through the backend, which returns the URLs that the host project includes. A project can therefore make invitation behavior part of its URL design rather than treating all invitation endpoints as a fixed, opaque part of the application.

The README also describes base models and the option to use custom models for greater customization. It presents the concrete models as the simplest route, while the documentation's cooking section points developers toward other configurations when product requirements differ. This is useful for teams that need shared-account semantics but also need their own fields, ownership rules, or domain-specific membership behavior. The repository layout includes example accounts and custom test directories, which is consistent with customization being an intended part of the design.

One dependency detail deserves attention. `pyproject.toml` declares both `Django>=4.2` and `django-extensions>=2.0.8`. The README says the default auto slug field comes from `django-extensions`, and `ORGS_SLUGFIELD` can be changed to a project-provided alternative. The slug setting is therefore part of the installation contract, not merely a cosmetic option.

Install django-organizations and Add the First Routes

The README gives a direct installation path. Install the package into the Python environment used by the Django project. The package declares Python 3.10 or later, and the current project metadata targets Django 5.2, 6.0, and 6.1 across the Python versions listed in the README.

Use the following command in the environment that runs your Django application:

bash
pip install django-organizations

After installation, add the authentication application and `organizations` to the project's settings. The following is the configuration shape documented by the README:

python
INSTALLED_APPS = (
    ...
    'django.contrib.auth',
    'organizations',
)

Next, import the organizations URL modules and the invitation backend in the project's URL configuration. The README gives this routing pattern:

python
from organizations.backends import invitation_backend

urlpatterns = [
    ...
    path('accounts/', include('organizations.urls')),
    path('invitations/', include(invitation_backend().get_urls())),
]

The `accounts/` and `invitations/` prefixes are project choices shown in the README. They do not create authentication by themselves, and they do not by themselves define the pages users see. The README points to the Getting Started documentation for the complete setup and product-specific decisions. At this stage, the useful first verification is that the project imports its settings and URL modules cleanly, then that migrations and templates required by the selected concrete models are applied through the normal Django workflow. The README does not document those migration commands, so this article does not invent them.

Choose the Auto Slug Field Before Migrating

Django Organizations needs an auto slug field for its standard models. The README states that the default implementation is imported from `django-extensions`, but that the project can configure another field through `ORGS_SLUGFIELD`. The default setting is:

python
ORGS_SLUGFIELD = 'django_extensions.db.fields.AutoSlugField'

This setting should be resolved before the relevant organization migrations run. The README does not explain migration generation, slug collision behavior, or the exact schema consequences of choosing an alternative, so those points require inspection in the installed version's documentation and migration files. That is a real adoption concern for applications where URLs must remain stable or where an existing slug implementation is already part of the domain model.

The package metadata already declares `django-extensions>=2.0.8`, but the README also says a comparable slug library can be used if the project changes the setting. Teams should treat the default and the alternative as different integration paths. One uses the dependency declared by the package and documented by the README. The other requires a compatible field implementation and may affect migrations, imports, and slug generation behavior. Neither choice changes the core goal of separating users from shared organizations, but both affect the host project's dependency and migration work.

The repository's testing files include `test_abstract`, `test_accounts`, `test_custom`, and `test_vendors`. Based on that layout, the project distinguishes base, account, custom, and vendor-oriented test coverage. That structure suggests customization is part of the intended surface, although the README does not provide a complete vendor API or migration guide.

Invitation and Registration Boundaries

Invitation and registration are the parts most likely to create project-specific decisions. django-organizations includes backends and exposes invitation backend URLs, but its stated goals keep it agnostic about the registration mechanism and user messaging. That means the package can provide a common invitation surface while the host application controls how users are created, notified, or approved.

The README's example calls `invitation_backend()` when retrieving URLs. It does not document a complete sequence for creating an organization, sending an invitation, accepting it, or assigning roles. It also does not state whether email delivery is built in. Use the package's invitation integration as the documented starting point, then confirm the exact backend behavior in the Getting Started documentation before designing email templates or membership approval rules.

This boundary is useful for applications that already have a registration and messaging stack. It is a limitation for teams expecting a complete signup product. A project with strict tenant provisioning, audit requirements, domain restrictions, or custom invitation expiry rules should not assume those requirements are solved by the default URLs. The README explicitly says the functionality can be extended, which places application-specific rules in the project rather than hiding them in a fixed package workflow.

The same distinction applies to ownership. The README confirms that users can belong to and own multiple organizations. It does not specify a universal role model, permission matrix, or transfer process. Those details should be checked against the models and documentation selected for the deployment.

Version Targets, Releases, and Upgrade Cost

The repository metadata gives a useful compatibility boundary. `pyproject.toml` requires Python 3.10 or later and declares Django 5.2, 6.0, and 6.1 as target framework versions. The README gives a more detailed matrix: Django 5.2.x with Python 3.10 through 3.14, Django 6.0.x with Python 3.12 through 3.14, and Django 6.1.x with Python 3.12 through 3.14. Those are the documented targets, not a claim that every older or newer combination will work.

Recent releases include `2.6.0` with Django 6 support and `v2.7.0` with async helper methods and a template variable fix. The repository is not archived, and the last push was on 2026-10-08. Those facts support treating the project as recently changed, but they do not establish compatibility for a particular upgrade. The README describes upgrading as expected to be low impact and points to an Upgrading section in the Getting Started documentation. The actual migration considerations are not reproduced in the README.

There is also a license inconsistency that should be resolved before adoption. The repository description identifies BSD-2-Clause, while `pyproject.toml` identifies BSD-3-Clause. The project metadata includes a `LICENSE` file, but the README does not reproduce its clauses. This article does not interpret the license. Inspect the repository license file and package metadata for the version being deployed.

For development, the README offers `uv sync` followed by `uv run pytest`, while `just test-all` runs the tox-based test matrix. These are contributor workflows, not application installation steps. The presence of multiple supported Django versions makes upgrade testing a concrete project cost.

django-organizations Compared with Django's Built-in Groups

Django's built-in `django.contrib.auth` groups and permissions address authorization. django-organizations addresses a different layer: named organizations or shared accounts, user-managed membership, ownership, invitations, and registration. The README says it works with the existing user model, so it can coexist with Django groups rather than replacing them.

That difference is the main adoption test. If the requirement is simply assigning users to permission groups, Django's existing authorization system is the narrower and more direct tool. If the product needs a customer account, workspace, team, or subscription container that several authenticated users can join and own, django-organizations provides the relevant domain vocabulary and backend hooks.

A project using a custom user model should also verify the integration details rather than assuming compatibility from the README alone. The documentation states that the existing user model can be `django.contrib.auth` or a custom model, but it does not show a complete custom-user configuration or enumerate every relationship. That is a concrete pre-adoption check.

The package does not claim to replace tenant billing, identity verification, or messaging. Those boundaries make it easier to combine with existing Django applications, but they also mean a production account system requires additional project code.

Editorial conclusion

Adopt django-organizations when a Django application needs multi-user accounts or organization membership without replacing its existing user system. Do not adopt it as a complete authentication, billing, subscription, or messaging solution, because those concerns are outside its stated goals. Verify first that your Django and Python versions fit the documented targets, then inspect the concrete models, invitation backend, slug configuration, and migrations before shipping.

Frequently asked questions

Can django-organizations work with a custom Django user model?

Yes. The README states that it works with the existing user model, including `django.contrib.auth` or a custom model, and does not require additional user or authentication functionality. The complete custom-model integration should still be checked in the chosen version.

How do I install django-organizations in a Django project?

The README documents `pip install django-organizations`, then adding `django.contrib.auth` and `organizations` to `INSTALLED_APPS`. It also requires configuring the organizations URLs and an invitation backend URL.

Does django-organizations provide authentication, subscriptions, or email messaging?

No. The project goals explicitly list authentication, registration, invitations, and user messaging as backend agnostic. The package focuses on organizations, shared accounts, membership, and extension points, so those adjacent systems remain application responsibilities.

Official sources

  1. bennylope/django-organizations on GitHub
  2. License: BSD-2-Clause
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/bennylope-django-organizations.svg)](https://hysenlabs.com/projects/bennylope-django-organizations)

Was this useful?