django-updown

A reusable Django application for YouTube-like up and down voting
Download

django-updown Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Daniel Banck
  • Publisher web site:
  • http://weluse.de

django-updown Tags


django-updown Description

A reusable Django application for YouTube-like up and down voting django-updown is a simple Django app for adding YouTube-like up and down voting.Usage:Add "updown" to your INSTALLED_APPS then just add a RatingField to your model and go:from django.db import modelsfrom updown.fields import RatingFieldclass Video(models.Model): rating = RatingField()You can also allow the user to change his vote:class Video(models.Model): rating = RatingField(can_change_vote=True)Now you can write your own view to submit ratings or use the predefinded:from updown.views import AddRatingFromModelurlpatterns = patterns("", url(r"^(?P\d+)/rate/(?P+)$", AddRatingFromModel(), { 'app_label': 'video', 'model': 'Video', 'field_name': 'rating', }, name="video_rating"),)To submit a vote just go to video//rate/(1|-1). If you allowed users to change they're vote, they can do it with the same url. Requirements: · Python · Django


django-updown Related Software