Django

Code

Ticket #587 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] Allow iteration through formfields in a FormWrapper

Reported by: Boffbowsh Assigned to: adrian
Milestone: Component: Template system
Version: Keywords:
Cc: paul.bowsher@gmail.com Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Index: /usr/local/django_src/django/core/formfields.py
===================================================================
--- /usr/local/django_src/django/core/formfields.py     (revision 764)
+++ /usr/local/django_src/django/core/formfields.py     (working copy)
@@ -107,6 +107,7 @@
     def __init__(self, manipulator, data, error_dict):
         self.manipulator, self.data = manipulator, data
         self.error_dict = error_dict
+        self.fields = [self.__getitem__(field.field_name) for field in self.manipulator.fields]
 
     def __repr__(self):
         return repr(self.data)

Attachments

Change History

11/15/05 17:28:45 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

(In [1253]) Fixed #587 - iteration through formfields in a FormWrapper? is now allowed (thanks, Boffbowsh)


Add/Change #587 ([patch] Allow iteration through formfields in a FormWrapper)




Change Properties
Action