views:

47

answers:

1

I read this page: http://www.djangoproject.com/documentation/models/custom_pk/, and the example doesn't list unique=True. I'm wondering if there is a compelling reason for them to leave it out, or if there is some reason I should include it. My assumption is that specifying primary_key=True does this automatically though. Any thoughts?

+3  A: 

http://docs.djangoproject.com/en/1.1/ref/models/fields/#primary-key

Your assumption is correct, primary_key=True implies unique=True.

Josh Wright
Great, thanks Josh. BTW, have you ever seen the Dan Band?
orokusaki