[mezzanine-users] Re: Adding Product Reviews with Ratings to Cartridge Product Model

2016-04-29 Thread Rodrigo Gadea
( 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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Suggestion on how to make import and export of products using csv from admin panel?

2016-04-29 Thread Eduardo Rivas
Adding to the suggestions, I've used django-import-export in the past 
with satisfactory results. It does admin integration out of the box and 
let's you pick different import/export formats (Excel, csv, json, etc). 
I've only used it to export records; can't speak for the importing part. 
The docs will guide you all the way through.


https://django-import-export.readthedocs.io/en/latest/

--
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Suggestion on how to make import and export of products using csv from admin panel?

2016-04-29 Thread Stephen McDonald
There's a potentially outdated CSV import script here:

https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/management/commands/product_db.py

That should get you 90% of the way

On Sat, Apr 30, 2016 at 4:06 AM, Sathish Anton 
wrote:

> Hi,
> Please provide Suggestion on how to make import and export of products
> using csv from admin panel?
>
> Thanks and Regards,
> Sathish Anton. A
>
> --
> 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 mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Custom profiles doesn't save on admin

2016-04-29 Thread Bruno Barbosa
Hi,

I've created a custom profile as described on documentation (
http://mezzanine.jupo.org/docs/user-accounts.html#profiles).

After I did access on admin and my new fields appear correctly, but when I
put some info and save it the fields are blank.

Someone did have this isssue or know how to fix it?

My software versions are:
Mezzanine 4.0.1
Django 1.8.9
Python 2.7.6

--
Bruno Barbosa
Web Developer
*brunobarbosa.com.br *

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Suggestion on how to make import and export of products using csv from admin panel?

2016-04-29 Thread Ken Bolton
Hi Sathish,

What have you tried so far? There is plenty of documentation out there
on working with Django and CSV, and plenty more on Django's admin
interface.

If you are not using Python 3, I can caution you to use the unicodecsv
module: https://pypi.python.org/pypi/unicodecsv.

hth,
ken

On Fri, Apr 29, 2016 at 2:06 PM, Sathish Anton  wrote:
> Hi,
> Please provide Suggestion on how to make import and export of products using
> csv from admin panel?
>
> Thanks and Regards,
> Sathish Anton. A
>
> --
> 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 mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Suggestion on how to make import and export of products using csv from admin panel?

2016-04-29 Thread Sathish Anton
Hi,
Please provide Suggestion on how to make import and export of products 
using csv from admin panel?

Thanks and Regards,
Sathish Anton. A

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.