Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.547.249 Times

django-simple-ratings 0.2.0

Company: Charles Leifer
Date Added: September 06, 2013  |  Visits: 215

django-simple-ratings

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 downloads)



a simple, extensible rating system.<br />With a little bit more<br /><br />also, a playground for different stuff i've been reading about in programming collective intelligence, by toby segaran.<br /><br />this stuff lives in utils.py and is there if you want to experiment (or contribute!).<br />Getting started<br /><br />you'd like to add ratings to some model:<br /><br />from django.db import models<br />from rating.models import Ratings<br /><br />class Food(models.Model):<br /> name = models.CharField(max_length=50)<br /><br /> ratings = Ratings()<br /><br />now, you can:<br /><br /># add ratings to things<br />>>> apple.ratings.rate(user=john, score=1)<br /><RatedItem: apple rated 1 by john><br /><br />>>> apple.ratings.rate(user=jane, score=5)<br /><RatedItem: apple rated 5 by jane><br /><br /># get interesting aggregate data<br />>>> apple.ratings.all()<br />[<RatedItem: apple rated 1 by john>, <RatedItem: apple rated 5 by jane>]<br /><br />>>> apple.ratings.cumulative_score()<br />6<br /><br />>>> apple.ratings.average_score()<br />3.0<br /><br /># order things by their rating<br />>>> Food.ratings.order_by_rating()<br />[<Food: apple>, <Food: orange>]<br /><br />Use GFKs, FKs, whatever<br /><br />By default, whenever you add Ratings() to your model it uses the RatedItem model which has a GFK on it. Suppose you are only rating one thing, or would like to have an explicit database constraint -- that's no problem. You can provide a custom RatedItem model with a ForeignKey instead of a GFK. Here's the example from the tests:<br /><br />class BeverageRating(RatedItemBase):<br /> content_object = models.ForeignKey('Beverage')<br /><br /><br />class Beverage(models.Model):<br /> name = models.CharField(max_length=50)<br /><br /> ratings = Ratings(BeverageRating)<br /><br /> def __unicode__(self):<br /> return self.name<br /><br />The API is exactly the same.<br /><br />#md5=572cb4ce063604a4818c67d4e91f1d4b

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Apple Appleratingsaverage Score Import Model Modelscharfieldmax Length Order Rated Rateditem Rating Ratinggtgtgt Ratings Stuff Suppose Thing Things Whateverby
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


DJANGO-SIMPLE-RATINGS RELATED
Education  -  7Sage SAT Prep - Proctor Practice Exam for Math, Writing and Critical Reasoning 1.0.0
Want a higher SAT score? You need this app. Make practice SATs feel just like the real thing using the included proctor. Perfect for SAT prep - including real proctoring instructions, high quality audio, realistic background sounds,...
27.3 MB  
Network & Internet  -  django-sortedm2m 0.3.0
django-sortedm2m is a drop in replacement for Django's own ManyToManyField. The provided SortedManyToManyField behaves like the original one but remembers the order of added relations. sortedm2m requires at least django 1.2. Django 1.1...
20.48 KB  
Programming  -  redisco 0.1.0
Redisco is a Python module that allows you to store objects in _Redis: http://code.google.com/p/redis/. It is inspired by Ruby library _Ohm: http://github.com/soveran/ohm/ and its design and code are loosely based on Ohm and the Django ORM. It is...
20.48 KB  
Network & Internet  -  django-compound-field 0.1
django-compound-field is a Django add-on that allows you to define compound fields, e.g. {{{ class AddressField(CompoundField): phone = models.CharField(max_length=30) mobile = models.CharField(max_length=30) fax...
20.48 KB  
Multimedia & Graphics  -  JPhotoTagger 0.15.2
JPhotoTagger is a platform independent Photo Manager. You can manage and find fast your photos through keywords, descriptions and other so called metadata ("tags"). It speeds up adding or editing tags through automatic keyboard input completion...
8 MB  
Multimedia & Graphics  -  Portable JPhotoTagger 0.15.2
JPhotoTagger is a platform independent Photo Manager. You can manage and find fast your photos through keywords, descriptions and other so called metadata ("tags"). It speeds up adding or editing tags through automatic keyboard input completion...
8 MB  
Graphics Viewers  -  Smart Photo Statistics 3.0
Smart Photo Statistics is designed to gather various types of photographic statistics. The user can view statistics such as: camera model, focal length, flash used, sensitivity etc. The data can be exported either as text or in a graphics format.
670 KB  
Video Players  -  MovieFunnel for Mac OS 1.2
A quick and easy video editor with a simple drag-and-drop interface. Perfect for trimming and assembling movie files from your digital cameras into a single movie with chapter markers that are recognized by iDVD. Just drag movies in and click...
7.2 MB  
MP3 Tools  -  FlipPageMaker Free Flip Page Creator 1.0.0
It's not easy to draw people's attention with simply plain Text file, but presenting it in flash way can be totally different. Now our flipbook creator - Free Flip Page Creator, can definitely help you with this. This freeware will enable you to...
8.92 MB  
Development Tools  -  0-1 Knapsack 1.0
Please let others rate your work. Rating your own stuff highly says nothing about the code, but perhaps drops you closer to the level of a spammer on the FEX like Marco. So let the rating system do its job. I know that you think your stuff is...
10 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB