Seemant,

On 10/21/06, seemant <[EMAIL PROTECTED]> wrote:
>
> OK, I've just made a discovery everyone. It works if you have a
> to_verse.  But if to_verse is "None" or NULL or whatever, then it just
> adds it.  So Genesis 1:1-2 will catch uniqueness but Genesis 1:1 will
> not.

Well that´s, nothing more nothing less, the expected behaviour:

http://www.djangoproject.com/documentation/model_api/#unique-together

What happens if you try

unique_together = (('book', 'chapter', 'from_verse'),
                   ('book', 'chapter', 'from_verse', 'to_verse',))

?

Of course yo should zap the DB and make manage.py re-create if from
scratch from the models (so the additional UNIQUE constraint is set)
before testing
this.

Good luck.

>
> Thanks!
>
> Seemant
>
>
> >
>


-- 
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to