Re: practical django and snippet rating problems

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 8:11 AM, andreas schmid wrote: > the model class described in the book looks like this for the Rating model: > >class Rating(models.Model): >RATING_UP = 1 >RATING_DOWN = -1 >RATING_CHOICES = ((RATING_UP, 'useful'), > (RAT

Re: practical django and snippet rating problems

2009-09-07 Thread andreas schmid
hi karen, thank you for the answer! Karen Tracey wrote: > On Mon, Sep 7, 2009 at 5:45 AM, andreas schmid > wrote: > > > hi list, > > im experiencing problems with the rating functionality described > in the > code sharing site in the practical django

Re: practical django and snippet rating problems

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 5:45 AM, andreas schmid wrote: > > hi list, > > im experiencing problems with the rating functionality described in the > code sharing site in the practical django projects book: > > if i try to get the score of a snippet with {{ object.get_score }} in > the template i get

practical django and snippet rating problems

2009-09-07 Thread andreas schmid
hi list, im experiencing problems with the rating functionality described in the code sharing site in the practical django projects book: if i try to get the score of a snippet with {{ object.get_score }} in the template i get a result like: {'rating__sum': -2} why is that? def g