Clone wiki

django-affiliate / Home


Django-affiliate is an app for tracking affiliate referrals on a django powered site. It tracks both anonymous and authenticated visits, and it reconciles anonymous visits with authenticated users after login. It does the above through middleware without requiring a custom login view.


  1. Copy the affiliate directory to your apps directory
  2. Add affiliate to your installed apps
  3. Add apps.affiliate.middleware.AffiliateMiddleware to MIDDLEWARE_CLASSES somewhere after session and authentication middleware
  4. Include the urls to your project's main


urlpatterns = patterns('',
    #Your URLS
    (r'affiliate/', include('affiliate.urls')),


Use the admin to create affiliates and view reports for each affiliate. The reports can be used to determine payment for affiliates.

If you have any feature requests, please message me here on Bitbucket.