Hello,
I can't for the life of me figure out the root of this error:
IntegrityError: columns site_id, slug are not unique
I am using a modified version of the script found here:
http://djangosnippets.org/snippets/2255/
I am using it to import a spreadsheet of a couple hundred products,
but I have cut it down to only a few rows for testing. I am
consistently getting errors about columns not being unique, but it's
really frustrating because I don't know how these columns aren't
unique.
The site is 'localhost' and id=1. Slug is a concatenation of a few
different strings in different columns, so I just can't understand how
they could not be unique. Is there anyway to make it so that site_id
and slug don't have to be unique. Better yet, is there any way to
figure out why the heck this is happening. (If I do print statements
of the strings I am assigning, I can see clearly that site is
'localhost' and id=1 and that slug is a different string).
I'm surely just missing something about the whole "unique_together"
requirement, so maybe someone can enlighten me about this general
issue. (I did not want to paste in any code quite yet because I
figure some general understanding about this will solve my issue. I
am having a painful time finding any info about this elsewhere.)
Thank you!