Django

Code

Show
Ignore:
Timestamp:
09/02/08 09:20:11 (3 months ago)
Author:
jacob
Message:

Fixed #8795: unique_together validation no longer fails on model forms that exclude fields included in the check. Thanks, Alex Gaynor.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/model_forms/models.py

    r8842 r8854  
    11931193{'__all__': [u'Price with this Price and Quantity already exists.']} 
    11941194 
     1195>>> class PriceForm(ModelForm): 
     1196...     class Meta: 
     1197...         model = Price 
     1198...         exclude = ('quantity',) 
     1199>>> form = PriceForm({'price': '6.00'}) 
     1200>>> form.is_valid() 
     1201True 
     1202 
    11951203# Choices on CharField and IntegerField 
    11961204>>> class ArticleForm(ModelForm):