chefsmart wrote:
> By the way, right now I'm using a State.objects.get(name__iexact=name)
> in clean_name() method in a form subclass to prevent creation of case-
> insensitive duplicates. Just wondering if there is a built-in or
> better way.
>
Well, in postgresql itself one can make a case insensitive unique
constraint using "functional index" functionality:
create unique index app_state_lower_name_idx on app_state(lower(name));
as per:
http://archives.postgresql.org/pgsql-general/2005-09/msg00842.php
I guess django's ORM would need some surgery to make it automagically
generate and manage such constraints though.