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!
Metadata
Release files for mlmprovisions 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlmprovisions-0.1.8.tar.gz | 15.1 kB | Without provenance | Details for mlmprovisions-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlmprovisions-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for mlmprovisions-0.1.8-py3-none-any.whl |
Total release size: 39.2 kB
Release files / mlmprovisions-0.1.8.tar.gz
| Download URL | mlmprovisions-0.1.8.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd51400f49222670c14afd991d12e5685ebc96db86ac56d85618bbc1a557815c
|
|
BLAKE2b-256 checksum How to use checksums |
1ad1f08a30fdd86962382f2cef071b6f288185adc7f983e33a95864d3196d1a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / mlmprovisions-0.1.8-py3-none-any.whl
| Download URL | mlmprovisions-0.1.8-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b42645b731bfaab4f20791d99b2bc663c70864aa34668f31d18b52efd43de5c9
|
|
BLAKE2b-256 checksum How to use checksums |
fa39b2599c49df41e1b54cd676b7cd57f9042ad64d49d0b8cac93e51ca867622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for mlmprovisions 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.