Skip to main content

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

CI PyPI version License Python Versions Coverage Status

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. github star

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_referral_system-0.3.1.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_referral_system-0.3.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file django_referral_system-0.3.1.tar.gz.

File metadata

File hashes

Hashes for django_referral_system-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6e88cbbc0d2a5973124d41b21e787f5e3b75b891501c55efeed948127b020ee5
MD5 1159971c0f21d94a04b31ddff9c16dae
BLAKE2b-256 c1e6a6abf53af4a80bd1fc958877abe6bf25f305c88b0dd089cbffe3aa1aed41

See more details on using hashes here.

File details

Details for the file django_referral_system-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_referral_system-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c44a7ce96fb425eda02f0fcde080b35b9320c6a8f2e785247f220112b9b6145
MD5 46a78b32040c9b8a227ef581f40e4f2b
BLAKE2b-256 48d8d2189c09644ce183feed1e2fb6435d4c959e0f24c2c83add10bc3620780a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page