@Dave:
It is not a 1-to1 as I would like each borrower to provide his own
rating, and then compute the average ratings per book - to make
recommendations for the highest rated books.
Thanks for the example in the reply too. I will try out the SQL update
shortly.
@ Russ:
Thanks too for the
On Sat, Dec 27, 2008 at 7:48 AM, eldonp2 <eldo...@gmail.com> wrote:
>
> Is there a way to calculate and store the average rating in this
> example:
It's not entirely clear which part of this problem you want help with.
- Computing the average rating. The brute force
ven't used this in production
yet. Let me know if this works for you.
On Dec 26, 4:48 pm, eldonp2 <eldo...@gmail.com> wrote:
> Is there a way to calculate and store the average rating in this
> example:
>
> RATING_CHOICES = {
> '3' : 'Excellent',
> '2' : 'Good',
>
Is there a way to calculate and store the average rating in this
example:
RATING_CHOICES = {
'3' : 'Excellent',
'2' : 'Good',
'1' : 'Poor',
}
class Loan(
...
book = models.ForeignKey(Book)
rating = models.IntegerField(choices=RATING_CHOICES)
...
class BookRatings(...
...
book
4 matches
Mail list logo