django-organizations

raw JSON →
2.6.0 verified Fri May 01 auth: no python

Django package providing group accounts (organizations) with user invitations and multi-user membership. Supports Django 4.2–6.0 and Python ≥3.10. Current version 2.6.0 (2025). Releases are sporadic but maintained.

pip install django-organizations
error ModuleNotFoundError: No module named 'organizations'
cause Package not installed or not in INSTALLED_APPS.
fix
Run 'pip install django-organizations' and add 'organizations' to INSTALLED_APPS.
error django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: organizations
cause Two apps with label 'organizations' in INSTALLED_APPS (e.g., a local app with same name).
fix
Rename your local app to something else, or use 'organizations' as the label only once.
error AttributeError: 'Organization' object has no attribute 'add_user'
cause Using a custom Organization model that does not inherit from the mixin providing add_user.
fix
Ensure your Organization model extends organizations.models.AbstractOrganization or use the default model.
breaking Dropped Python 3.9 support in 2.6.0. Requires Python >=3.10.
fix Upgrade Python to 3.10 or later.
breaking Dropped Django 4.1 support in 2.4.0. Requires Django >=4.2.
fix Upgrade Django to 4.2 or later.
deprecated The base abstract models (e.g., BaseOrganization) are not meant for direct instantiation. Use the concrete models from organizations.models.
fix Import Organization, OrganizationUser from organizations.models instead of organizations.base.
gotcha The slug field is unique and auto-generated from name on creation unless explicitly provided. Changing name later does not update slug.
fix Set slug explicitly if you need a different slug, or update slug manually after name change.

Basic setup: add to INSTALLED_APPS, include URLs, use Organization model.

# settings.py
INSTALLED_APPS = [
    ...
    'organizations',
]

# urls.py
from django.urls import include, path
urlpatterns = [
    ...
    path('organizations/', include('organizations.urls')),
]

# models.py (using default abstract models)
from organizations.models import Organization, OrganizationUser

# Example creation:
from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.create_user('alice', password='password')
org = Organization.objects.create(name='Acme Inc', slug='acme')
org_user = org.add_user(user, is_admin=True)