> Oh, it's not creating the ID, my question was whether I can safely > assume that I will always get an IntegrityError (and nothing else) and > whether just inserting stuff and catching errors is the recommended > Pythonic way.
IntegrityError is what you will get on a unique conflict, yes. However, it seems like a poor solution to spam INSERTS until you get a valid ID. Why exactly do you need a random ID? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---