Metadata-Version: 1.0
Name: django-referral
Version: 0.3.1
Summary: A small django application for marketing using referral links
Home-page: https://github.com/byteweaver/django-referral
Author: akuryou
Author-email: contact@byteweaver.net
License: Copyright (c) 2012, byteweaver
All rights reserved.


This software may be used by any non profit, open source or educational project
and by everyone who contributed to django-referral under the terms of the
BSD license found further below.


In any other case like comercial projects:
Please contact us at contact@byteweaver.net if you want to use this software.


Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of django-referral nor the names of its contributors may
      be used to endorse or promote products derived from this software without
      specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Description: # django-referral
        
        A small django application for marketing using referral links
        
        ## What is this app good for?
        
        Imagine you got a nice website runnig and you want to make some marketing in order to gain more users.
        This can be achieved by spreading links/banners over the internet pointing to your website.
        Now in order to find out how your banners performed you need to know how many users registered
        after clicking on one of your banners. To tell them apart you add some unique GET parameter to
        each link. This app will detect those referral parameters and store for each user what referrer
        lead him to your website.
        
        ## Key Features
        
        * Manual and automatic referrer generation.
        * Referrer organisation in campaigns.
        * Automatic associating of referrers with campaigns using patterns.
        * Referrers will be cached in sessions, so when a user first browses your site and does not
          immediately register the referrer will be cached and assigned when the user finally decides
          to register. That way you can link to any site and not necessarily a register page.
        * Very easy integration.
        * Completely configurable to your needs.
        * Django-south support
        * No dependencies
        
        ## Download
        
        ### using pip
        
        	pip install django-referral
        	
        ### github
        
        	https://github.com/byteweaver/django-referral
        	
        ## Integration
        
        ### 1. Add referral to your INSTALLED_APPS
        
        	INSTALLED_APPS = (
        		...
        		'referral',
        		...
        	)
        
        ### 2. Add ReferrerMiddleware to your MIDDLEWARE_CLASSES
        
        Since django-referral uses django's session middleware make sure you add it after SessionMiddleware
        
        	MIDDLEWARE_CLASSES = (
        		...
        		'django.contrib.sessions.middleware.SessionMiddleware',
        		'referral.middleware.ReferrerMiddleware',
        		...
        	)
        
        ### 3. Trigger the referrer association after user creation
        
        	from referral.models import UserReferrer
        	...
        	def my_user_creation_view(request):
        		...
        		UserReferrer.objects.apply_referrer(user, request)
        
        ## Settings
        
        ###REFERRAL_GET_PARAMETER
        
        The name of the GET parameter used.
        
        	Default: "ref"
        
        ###REFERRAL_SESSION_KEY
        
        The name of the session key that will hold the detected referrer
        
        	Default: "referrer"
        
        ###REFERRAL_AUTO_CREATE
        
        Defines weather unknown referrers shall be autocreated
        
        	Default: True
        
        ###REFERRAL_AUTO_ASSOCIATE
        Defines weather referrest should be associated to campaigns automatically using patterns
        
        	Default: True
Platform: UNKNOWN
