Reading back over my original question, I realized I should probably 
explain the desired outcome in more detail. What I'm trying to do is simply 
attach the commenting functionality to the existing product ratings. So a 
customer who purchased a product can come back to the website, enter their 
rating, and also enter their own personalized review. This is a different 
use case than the comments themselves having ratings. The ratings and 
"reviews" (comments) will belong to the product object, so that 
rating_average() and rating_count() still work as expected.

Ideally this would be atomic, so a user would have to enter both a rating 
and a "review" in order to save to the db.

Hope that helps clarify. Again, I'm grateful for any help/nudges in the 
right direction.

On Tuesday, September 9, 2014 11:35:06 AM UTC-4, Brian C wrote:
>
> I've searched through this forum and the docs for both Cartridge and 
> Mezzanine and haven't been able to get a handle on the best way to 
> implement traditional product reviews. I could of course write an entirely 
> new app to handle reviews and ratings together, but since Mezzanine already 
> has RatingsField and CommentsField, it seems like there should be a 
> workable solution without having to rewrite parts of both in a new app.
>
> I'm using field injection to avoid the overhead of multi-table 
> inheritance, and haven't had problems adding any other Mezzanine fields, 
> but when I try injecting a CommentsField from mezzanine.generic.fields, I 
> get in ImproperlyConfigured error:
>
> The EXTRA_MODEL_FIELDS setting contains arguments for the field 
> 'mezzanine.generic.fields.CommentsField' which could not be applied: 
> __init__() got multiple values for keyword argument 'to'
>
> Here's my injected field in settings.py:
>
>     ("cartridge.shop.models.Product.reviews", 
> "mezzanine.generic.fields.CommentsField", ("Product reviews",),
>     {"max_length": 1000, "blank": True, "null": True},
>     ),
>
> Shouldn't the Product be the only argument passed here? What have I 
> misunderstood?
>
> Also in general, is this the best/easiest approach to implementing basic 
> product reviews? Or is there a better way? I'm certainly open to 
> suggestions/ideas.
>
> Thanks in advance!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to