I want users to receive โpointsโ for performing various tasks in my application - from tasks such as tagging objects and making friends. I have not yet found a Django application that simplifies this.
At the moment, I think that the best way to accumulate points is that each user action creates the equivalent of a "stream item", and the points are calculated by counting the value of each action published in their stream.
Obviously, social game mechanics is a huge area with a lot of research going on at the moment. But in terms of development, what is the easiest way to get started? Am I on the wrong track or are there better / easier ways?
Edit: for those who need a very simple implementation:
For those interested in a very simple implementation of this idea, try creating a "logging" application and putting it in your models.py:
log_models = [Tag, Post, Vote]
class Point(models.Model):
def increase_score(sender, instance, signal, *args, **kwargs):
for model in log_models:
post_save.connect(increase_score, sender=model)
post_delete.connect(decrease_score, sender=model)
Refer to this document if you find that post_save emits twice: http://code.djangoproject.com/wiki/Signals#Helppost_saveseemstobeemittedtwiceforeachsave
source
share