A Django app for managing referral programs, promoters, referrals, and tracking referral performance with advanced features like commission setting, invitation management, and Wise payouts.
Project description
django-referral-system
A plug-and-play Django referral engine. Track promoters, reward commissions, manage payouts — all wired up in minutes.
Full documentation: Read the Docs
What it does
| Area | Capability |
|---|---|
| Promoters | Create and manage promoters with unique referral tokens and links |
| Referral tracking | Track sign-ups, activation status, and click counts per link |
| Commissions | Configurable commission rates tied to the active referral program |
| Payouts | Wise CSV export; auto-skip promoters below minimum withdrawal balance |
| Refunds | Commission is automatically reversed when a referred user refunds |
| Email invitations | Send branded HTML invite emails via a custom template |
Only one referral program can be active at a time, keeping the logic focused and predictable.
Quick start
1. Install
pip install django-referral-system
Requires Python 3.9 – 3.13 and Django 4.2+.
2. Add to INSTALLED_APPS
INSTALLED_APPS = [
...
"referrals",
]
3. Mount the URLs
from django.urls import path, include
urlpatterns = [
...
path("referrals/", include("referrals.urls")),
]
4. Migrate
python manage.py migrate
5. Create a referral program
python manage.py create_referral_program \
--name="My Referral Program" \
--commission-rate=5.00 \
--min-withdrawal-balance=10.00
Setting a program as active automatically deactivates any existing active program.
Environment variables
| Variable | Purpose |
|---|---|
BASE_REFERRAL_LINK |
Base URL used when generating referral links |
BASE_EMAIL |
Sender address for invitation emails |
License
MIT — see LICENSE for details.
Contributing
Issues and pull requests are welcome. If this project saves you time, a star on GitHub goes a long way.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_referral_system-0.3.1.tar.gz.
File metadata
- Download URL: django_referral_system-0.3.1.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e88cbbc0d2a5973124d41b21e787f5e3b75b891501c55efeed948127b020ee5
|
|
| MD5 |
1159971c0f21d94a04b31ddff9c16dae
|
|
| BLAKE2b-256 |
c1e6a6abf53af4a80bd1fc958877abe6bf25f305c88b0dd089cbffe3aa1aed41
|
File details
Details for the file django_referral_system-0.3.1-py3-none-any.whl.
File metadata
- Download URL: django_referral_system-0.3.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c44a7ce96fb425eda02f0fcde080b35b9320c6a8f2e785247f220112b9b6145
|
|
| MD5 |
46a78b32040c9b8a227ef581f40e4f2b
|
|
| BLAKE2b-256 |
48d8d2189c09644ce183feed1e2fb6435d4c959e0f24c2c83add10bc3620780a
|