Changes between Initial Version and Version 1 of Ticket #13091, comment 22


Ignore:
Timestamp:
Mar 25, 2014, 3:44:40 PM (11 years ago)
Author:
Evstifeev Roman

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13091, comment 22

    initial v1  
    22{{{
    33#!python
    4 if form.is_valid(strict_uinique_checks=True):
     4if form.is_valid(strict_unique_checks=True):
    55    obj = form.save()
    66}}}
    7 The "''strict_uinique_checks''" kwarg will force ''ModelForm'' to perform uinique_together checks using existing instance values if some.fields are omitted in form.
     7The "''strict_uinique_checks''" kwarg will force ''ModelForm'' to perform unique_together checks using existing instance values if some.fields are omitted in form.
    88
    99Another option is to add new Meta option like this:
     
    1212class MyForm(ModelForm):
    1313    class Meta:
    14         strict_uinique_checks = True
     14        strict_unique_checks = True
    1515}}}
    16 Such form will then always fallback to using existing instance values for uinique_together checks when performig validation.
     16Such form will then always fallback to using existing instance values for unique_together checks when performig validation.
Back to Top