ive built a mini shop as part of a project. im trying to drag content
in from csv, using one of the django snippets link:(http://
djangosnippets.org/snippets/788/)

so my models are Brand Category Product and product references both a
brand and a category.

python csvimport.py --csv dubkorps.csv --mappings "1=partno,
2=brand1(Brand|id),3=category1(Category|id),4=pr......
snipped for brevity, but that is the format of the import statement.
however the foreign key doesnt work, it fails with

django.db.utils.IntegrityError: shop_product.brand1_id may not be NULL

it fails with this same error whether i put brand.name or brand.id
into the csv file.

anyone used this csvimport successfully?

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

Reply via email to