On Oct 14, 11:03 am, Daniel Roseman <[email protected]> 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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to