4.2.1.7. Package apps.managers.score_mgr

The manager for defining and managing scores.

4.2.1.7.1. Module apps.managers.score_mgr.models

The model definition for scores.

class apps.managers.score_mgr.models.PointsTransaction(*args, **kwargs)[source]

Entries that track points awarded to users.

Parameters:
  • id (AutoField) – Id
  • user_id (ForeignKey) – User
  • points (IntegerField) – The points for the transaction. negative number indicates a subtraction
  • transaction_date (DateTimeField) – The date of the transaction
  • message (CharField) – The message of the transcation.
  • object_id (PositiveIntegerField) – Object id
  • content_type_id (ForeignKey) – Content type
class apps.managers.score_mgr.models.ReferralSetting(*args, **kwargs)[source]

Defines the model of the dynamic referral settings.

Parameters:
  • id (AutoField) – Id
  • normal_referral_points (IntegerField) – The point amount for normal referral bonus.
  • super_referral_points (IntegerField) – The point amount for supper referral bonus, when the referral is from a team of participation rate from 20% to 40%
  • mega_referral_points (IntegerField) – The point amount for mega referral bonus, when the referrals is from a team of participation rate les than 20%
  • start_dynamic_bonus (BooleanField) – Start rewarding the dynamic referral bonus. set it to true if you want to reward referral bonus depends on referral’s team participation.
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.score_mgr.models.ScoreSetting(*args, **kwargs)[source]

score settings models.

Parameters:
  • id (AutoField) – Id
  • name (CharField) – The settings label.
  • setup_points (IntegerField) – The point amount for setting up the profile.
  • active_threshold_points (IntegerField) – The point amount for considering an active participant. It is also the threshold point amount for awarding referral bonus.
  • signup_bonus_points (IntegerField) – The point amount for signing up a commitment or event.
  • quest_bonus_points (IntegerField) – The point amount for completing a quest.
  • noshow_penalty_points (IntegerField) – The point amount for no show penalty.
  • feedback_bonus_points (IntegerField) – The point amount for providing action feedback.
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.score_mgr.models.ScoreboardEntry(*args, **kwargs)[source]

Defines the model that tracks user scores.

Parameters:
  • id (AutoField) – Id
  • profile_id (ForeignKey) – Profile
  • round_name (CharField) – The name of the round
  • points (IntegerField) – Points for this round
  • last_awarded_submission (DateTimeField) – Last award time

Table Of Contents

Previous topic

4.2.1.6. Package apps.managers.resource_mgr

Next topic

4.2.1.8. Package apps.managers.team_mgr

This Page