Skip to main content

Tracking and rating Django Model activities with ELO system

Project description

Djangelo

Django Plugin for tracking and rating actions with ELO system.

Implementation Example

  1. You have a blog.
  2. Your blog have posts.
  3. Each post have comments, likes and other user reactions.
  4. You want to evaluate which posts have lower or beyond user reactions in a quantitative way

This is your solution!

Main Features:

  • Track activity of your Django Models
  • Compare the activity of each Object with the activity of all objects tracked
  • Determine an ELO rating from this comparation

Cool Features:

  • Easy to implement
  • Ready to use

Documentation

Online

PDF download

Getting Started

Dependencies

  • python >= 3.5
  • Django >= 3

Installation

pip install djangelo

And then, three simple steps

FIRST: Add djangelo into your INSTALLED_APPS and define which models you want to track

INSTALLED_APPS = [
# ...
'django.contrib.contenttypes',
'djangelo'
]

DJANGELO = {
    'RATED_MODELS': [
        'myapp1.mymodel1',
        'myapp1.mymodel2',

        'myapp2.mymodel1',
    ]
}

SECOND: Get elo values from your Model

# Adding the ELORated on your models, those will be tracked

from django.db import models
from djangelo.utils import EloDescriptor

class MyModel(models.Model):
    elo = EloDescriptor()
    # ... here your code

# You can also get and compare elo rated objects
    instance1.elo.value
    >> 3.5

    instance1.elo >= instance2.elo
    >> True

FINALLY: Define when your objects increments his rating.

# To increse the elo rating just call elo.up() method
    myModelInstance.elo.up()
    myModelInstance.elo.down()

Customization

DJANGELO = {
    # Increse the sensibility for more sensitive rating.
    # This make more impact for each tracked activity
    # by default is 32
    'SENSIBILITY': 64,

    # You can define a default ELO value for the new objects created
    # by default is 1200
    'INITIAL_VALUE': 4000

    'RATED_MODELS': [...]
}

Contributing

Contributors are wellcome! Any new feature will be well recibed as merge request or issue.

Licence

Licensed over APACHE 2.0. See LICENSE

Manteiner

This software is developed and mantained by Agustin Jimenez.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

djangelo-0.1.4-py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page