Users are only able to post one comment each per 'product'

2 views
Skip to first unread message

Matthew

unread,
Sep 4, 2010, 8:27:36 PM9/4/10
to Satchmo users
Hi all, I'm working on a Satchmo site and it's mostly going great, but
unfortunately, as it says in the title, comments for products seem to
keep over-writing. Basically, each user can post a comment just fine,
but when they do again, it'll over-write the older one and only the
new one will be left.

Could there be some sort of database index problem here? I've been
racking my brain trying to come up with the cause of this, but I can't.

Alex Robbins

unread,
Sep 5, 2010, 11:16:32 PM9/5/10
to satchm...@googlegroups.com
My guess is that this has something to do with the productratings
module. I think it makes sure that each user can only rate items one
time. I don't remember if it uses comment moderation or a signal
handler. It has been a little while since I looked at the code.

Alex

> --
> You received this message because you are subscribed to the Google Groups "Satchmo users" group.
> To post to this group, send email to satchm...@googlegroups.com.
> To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
>
>

Chris Moffitt

unread,
Sep 6, 2010, 11:58:35 AM9/6/10
to satchm...@googlegroups.com
The code you're looking for is in /satchmo_ext/productratings/listeners.py

There is a function one_rating_per_product which makes sure that a person only has one comment per product. The intent is to limit spam. If there's a legit reason why someone may need to have one comment per person, then feel free to submit a patch with your proposed solution.

-Chris
Reply all
Reply to author
Forward
0 new messages