Reusable Django app to track provisions for affiliate partners. Includes tools for multi-level marketing provisions.
Project description
mlmprovisions
Reusable Django app, that allows you to track provisions for your affiliate partners. It has a flexible way of configuring how to split the provision and is capable of running multi-level marketing
Screenshots
Instalation
pip install mlmprovisions
Then add required apps settings.py
INSTALLED_APPS = [
...
'treenode',
'mlmtools',
'floppyforms',
...
]
Add to the urls.py
path('mlmtools/', include('mlmtools.urls'))
And sync the db
python manage.py makemigrations
python manage.py migrate
Configuration and usage
Using the admin interface add marketer nodes and tracking codes for them. We suggest adding 1 central node and several subnodes
Fields:
- Owner - the user this note is associated to
- Split type - how to split the provision
- fixed - this node takes a fixed percentage*
- tree split - MultiLevel split. This split is how much is sent up the tree
- Split cut - the slider how much we keep and how much we pass to the child nodes
- Can have children - whether the subnodes can create subnodes (MLM needs this)
- track code usage - how many times can the code be used (limitless/only once for all/only once per user)
To add attribution you have these methods
from mlmtools.models import TrackCode, CodeUse
str_code = "CFHUMJ"
#tells if this code can be used
CodeUse.test_use(str_code, client_user) #tells if this code can be used
#lets have something like an order (the track code uses generic relation)
dt = DummyTarget(name="my order target 2", amount=1000.0)
dt.save()
#and attach the code
CodeUse.use(str_code, client_user, target=dt, amount=dt.amount)
And finaly you can check how it looks by visiting
http://<yoursite>/mlmtools/list_codes/
ENJOY!
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
mlmprovisions-0.1.7.tar.gz
(33.2 kB
view hashes)
Built Distribution
Close
Hashes for mlmprovisions-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd372a1e891eeafbffa73c305cd90bc8d597e4f7ee7119511dce4d17362f218 |
|
MD5 | 9124e572baf99c5aa9cb236457f2dcb0 |
|
BLAKE2b-256 | 5caf29b7053d8f7d56be3805c3da1ad94e9d19934d5378bed84a7999d55d4e26 |