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.14 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.2.tar.gz (24.5 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.2-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_referral_system-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e2799f7cfa03c95510a79493e6cfe91d1a2011cfb480baf98475594bb62cc111
MD5 464acdff7cdb8b5a52a1e7489b374699
BLAKE2b-256 46c475307129e3bb34666f4a24f740d75ecc1147c5cc598f13b6a4ca8ad5c859

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_referral_system-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d8819287d0e0114821c3fa99201851461b70277ce9bbea6f83d36fa9f32346b
MD5 a4ce62112e38d362a6df31eb6d07c55c
BLAKE2b-256 1aeec5492e0f3ae6c3373b973e28590bf1950a2053d27274af5299171a803783

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