( Here is entire
thread: https://groups.google.com/forum/#!topic/mezzanine-users/8_cFR1ckdnw
)
I have to do the same and thought in the same solution - reusing comments
for product review - and came here (this thread is the only related I
found). For getting this working (in Mezzanine 4) you have to inject:
(
"cartridge.shop.models.Product.comments",
"mezzanine.generic.fields.CommentsField",
("generic.ThreadedComment", ),
{"blank": True, "null": True}, # Not sure if this is necessary
),
Note the "Product.comments" - I wanted to use "reviews" but you'll have to
modify the template tags.
I agree that this is not exactly a "review approach" but it saves you a lot
of code, gets you going and gives you an "ebay-like" functionality that may
be OK.
You usually don't "reply a review" - it's an opinion, you may find it
useful or not (the rating of the review/comment may also apply here, but I
think it may be better to save "+/-1"s. As ratings and comments are
separated in the code (a product review is usually a rating with an
explaination of the rating), I think it will be easier / better to create a
simple Review model with (rating, description, user_fk, product_fk),
recycle or reuse as much as possible of the tags and templates of comments
and then restrict if you want the form to the users that have the product
in their purchase history.
Did you go with this direction? (This was 2 years ago)
Anyway, hope this helps in the future,
Cheers,
Rodrigo
On Tuesday, September 9, 2014 at 12:35:06 PM UTC-3, 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.