maybe i'm mis understanding your explanation, but its not telling you that slug is the same as site_id, its saying the combination of slug and site_id aren't unique.
Somewhere in your import of data you have an object that has the same slug as another. e.g. product1-site1 appears multiple times. Ryan On Tue, Apr 19, 2011 at 4:14 PM, Brendan F <[email protected]> wrote: > 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! > > -- > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > > -- http://www.sudovi.com/ http://www.twitter.com/lifewithryan http://www.thecommontongue.com http://www.lifewithryan.com/ -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
