mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Changed 'raise' statements to new style syntax in documentation. Thanks DaNmarner. Refs #15635.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c70bdad8b4
commit
413ceb57b2
3 changed files with 9 additions and 9 deletions
|
@ -216,7 +216,7 @@ is where you define your own validation that works at the formset level::
|
|||
... form = self.forms[i]
|
||||
... title = form.cleaned_data['title']
|
||||
... if title in titles:
|
||||
... raise forms.ValidationError, "Articles in a set must have distinct titles."
|
||||
... raise forms.ValidationError("Articles in a set must have distinct titles.")
|
||||
... titles.append(title)
|
||||
|
||||
>>> ArticleFormSet = formset_factory(ArticleForm, formset=BaseArticleFormSet)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue