Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #1259 from Wilfred/master

Simplified a formset example in the docs
  • Loading branch information...
commit 0938970491eee41ccde11bf3efe5b307ced8dba6 2 parents 6e90bfd + b79aa79
Tim Graham authored June 12, 2013

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. 3  docs/topics/forms/formsets.txt
3  docs/topics/forms/formsets.txt
@@ -247,8 +247,7 @@ is where you define your own validation that works at the formset level::
247 247
     ...             # Don't bother validating the formset unless each form is valid on its own
248 248
     ...             return
249 249
     ...         titles = []
250  
-    ...         for i in range(0, self.total_form_count()):
251  
-    ...             form = self.forms[i]
  250
+    ...         for form in self.forms:
252 251
     ...             title = form.cleaned_data['title']
253 252
     ...             if title in titles:
254 253
     ...                 raise forms.ValidationError("Articles in a set must have distinct titles.")

0 notes on commit 0938970

Please sign in to comment.
Something went wrong with that request. Please try again.