Someone e-mailed me a reply, and I thought I'd make it public before I
reply.
What you could do is use manual transaction management and do
something like:
@transaction.commit_manually
def my_view(request):
...
try:
my_form.save()
except MyFormException:
# thrown when validation fails, etc.
transaction.rollback()
finally:
transaction.commit()
That should allow you to create the PKs and then get out of there if
there's a problem.