Template Error: invalid filter 'product_rating_average_string'

1 view
Skip to first unread message

BenO

unread,
Sep 25, 2008, 12:44:05 AM9/25/08
to Satchmo users
Current version: django 1.0/satchmo svn trunk as of 10 minutes ago.

When I go to the front page of the freshly installed sample app the
click an item (say the first item), I get a template error on line 11
of the _product_ratings.html template. The error says: Invalid filter:
'product_rating_average_string'

the line is

{% with product|product_rating_average_string as rating %}

If I take this block out (lines 11-13), I get another error on line 23
({% product_rating_form request product form %}) also related to
product ratings. And if I take that out, all is ok, but I dont get to
show the ratings.

So, is there something I need to install or enable to get these
ratings to work?

Thanks.

Ben

boonez

unread,
Sep 25, 2008, 5:10:23 PM9/25/08
to Satchmo users
Most likely you still have satchmo_ratings.py in your satchmo/shop/
templatetag directory. Remove this.

Unfortunately if you were running satchmo before what happens is it
doens't delete everythign first. It just copies the files over. So if
you have old code that wasn't removed that gets picked up. I've found
errors like this all over the place....

Mark

BenO

unread,
Sep 30, 2008, 12:35:17 AM9/30/08
to Satchmo users
Thanks for the suggestion. I always wipe django and satchmo from my
site-packages when I try to install a new version of either.

I fixed my issue. It was due to my stupidity. I assumed the settings-
customize.py file contained all the necessary changes, but I was
wrong! I checked my settings file, and I was missing the installed
apps line for satchmo.productratings. I resynced the db to add the
product ratings table, and all is well! Yay. I am off to modifying
templates.

For the record I am successfully running django 1.0 with the latest
trunk of satchmo.

Ben
Reply all
Reply to author
Forward
0 new messages