--
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-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What have you tried so far? What errors are you getting?
INSTALLED_APPS = ( ... 'import_export', )
3. Modified lib/python2.7/site-packages/cartridge/shop and added following code
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from import_export.admin import ImportExportMixin, ImportMixin, ExportActionModelAdmin
class CategoryAdmin(PageAdmin):
!class CategoryAdmin(ExportActionModelAdmin, PageAdmin):
class ProductVariationAdmin(admin.TabularInline):
!class ProductVariationAdmin(ImportMixin, admin.TabularInline):
class ProductImageAdmin(TabularDynamicInlineAdmin):
!class ProductImageAdmin(ImportMixin, TabularDynamicInlineAdmin):
+class ProductResource(resources.ModelResource):
+ class Meta:
+ model = Product
class ProductAdmin(ImportExportModelAdmin, DisplayableAdmin):
!class ProductAdmin(ImportExportModelAdmin, DisplayableAdmin):
+resource_class = ProductResource
1. python manage.py runserver
2. http://127.0.0.1:8000/admin/shop/product/
Import export options are available in admin.
3. First do an export of csv file say current.csv
4. Delete Django pony sample product.
5. Do import of same current.csv
The Product gets added without any errors.
However the errors observed are
1. The variation fields does not gets filled up.
2. Multiple images are not loaded.
3. Unit price and sales price are not updated.
I am not sure how the product variation are to be handled.
Thanks,
sathish Anton. A
INSTALLED_APPS = ( ... 'import_export', )
3. Add image files to /tmp/orig/product
4. Make changes to the /home/sathish/impexp/lib/python2.7/site-packages/cartridge/shop/admin.py as in the attached file.
5. python manage.py runserver
6. Enter admin panel
7. click on products
8. You will find import and export buttons in admin panel
9. Do export of file using csv format as csv format is only supported now for importing.
10. save the downloaded file.
11. Delete the single django pony product for testing purpose.
12. Do import of same csv file.
13. Review wont produce any output as import function is overridden by product_db import.
14. confirm submit. and products will be added as done by product_db.
Thanks and Regards,
Sathish Anton. A