django-invitations

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

Generic invitations app for Django with support for django-allauth. Current version 2.1.0, supports Python >=3.8 and Django 3.2+. Released occasionally, maintained by Jazzband.

pip install django-invitations
error django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: invitations
cause Multiple apps with the same label 'invitations' in INSTALLED_APPS (e.g., duplicate entries).
fix
Remove duplicate 'invitations' entry from INSTALLED_APPS.
error ModuleNotFoundError: No module named 'invitations'
cause The app is not installed or not in INSTALLED_APPS.
fix
Run 'pip install django-invitations' and add 'invitations' to INSTALLED_APPS.
breaking Version 2.0.0 dropped support for Django <3.2 and Python <3.6. Ensure your environment meets requirements.
fix Upgrade to Django >=3.2 and Python >=3.6.
deprecated The 'InvitationAdmin' class now requires 'default_auto_field' to be set. Missing it will cause migration errors.
fix Add default_auto_field = 'django.db.models.BigAutoField' to your InvitationAdmin subclass or use system check.
gotcha If using django-allauth, you must have 'allauth.account' in INSTALLED_APPS before 'invitations'.
fix Ensure order: 'allauth.account' before 'invitations'.

Basic setup for django-invitations with django-allauth.

pip install django-invitations

# settings.py
INSTALLED_APPS = [
    ...
    'invitations',
    'allauth',
    'allauth.account',
]

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

# Then run migrations
python manage.py migrate invitations