https://docs.djangoproject.com/en/1.3/ref/models/options/#unique-together
On Jun 15, 2011, at 9:40 AM, Tobias Ottenweller wrote: > hi, > > a had a look at the django documentation but I could not find a way to do > something like this in django: > > > CREATE TABLE test_table ( > id integer, > name text > ); > > ALTER TABLE ONLY test_table > ADD CONSTRAINT test_table_id_name_key UNIQUE (id, name); > > > Is there a way to put a constraint like this in django model class? > > -- > 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. > -- 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.