On Oct 14, 11:03 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > A better way might be to use model inheritance (multitable). The > parent model would just include the field you want to be unique, and > the subclassed models would include their own fields. You should be > able to set unique=True on that one field in the parent model, and it > should work.
I've also found that the field's uniqueness is not enforced at the admin level. Instead, if I try to set the field for a model to a value duplicated in a model of a different type (but with the same base class) then I get an IntegrityError complaining saying "column <fieldname> is not unique". --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---