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.0.tar.gz (23.9 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.0-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_referral_system-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7c78388d67a467e79710b0976367ca41704cd57e3713de499f9fb8fc51e9f388
MD5 f372fe7cf593264c195f9bdc7579b837
BLAKE2b-256 b2859c7bc5efbe8b11f57b9b7a8bc004772f5298b99cefb1611d7479cb413ee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_referral_system-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce10839289569d49352c8d9e154092c728966ed06a8193fe8254725c5200bde4
MD5 83611c200331c39ec6fac21722707849
BLAKE2b-256 0ebf7911cc08d72d45e2966e2cce21bfa8db4649c4bb1dbef3594f6c766de13c

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