app/soc/views/helper/forms.py
changeset 1360 f62c462037b6
parent 1308 35b75ffcbb37
child 1451 ef134d062b83
--- a/app/soc/views/helper/forms.py	Sun Feb 15 20:27:56 2009 +0000
+++ b/app/soc/views/helper/forms.py	Sun Feb 15 22:29:22 2009 +0000
@@ -65,21 +65,18 @@
       if hasattr(self.Meta.model, field_name):
         model_prop = getattr(self.Meta.model, field_name)
 
-        # Check if the Model property defined verbose_name, and copy that
-        # verbatim to the corresponding field label.
         if hasattr(model_prop, 'verbose_name'):
           self.fields[field_name].label = model_prop.verbose_name
 
-        # Check if the Model property added help_text, and copy that verbatim
-        # to the corresponding field help_text.
         if hasattr(model_prop, 'help_text'):
           self.fields[field_name].help_text = model_prop.help_text
 
-        # Check if the Model property added example_text, and copy that verbatim
-        # to the corresponding field help_text.
         if hasattr(model_prop, 'example_text'):
           self.fields[field_name].example_text = model_prop.example_text
 
+        if hasattr(model_prop, 'group'):
+          self.fields[field_name].group = model_prop.group
+
 
 class SelectQueryArgForm(forms.Form):
   """URL query argument change control implemented as a Django form.