Several style and import fixes regarding the GHOP module.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Wed, 09 Sep 2009 20:15:53 +0200
changeset 2893 1adc6a815c71
parent 2892 d7a19ac73f22
child 2894 4af34d6e2a2d
Several style and import fixes regarding the GHOP module. Reviewed by: Lennard de Rijk
app/soc/modules/ghop/logic/cleaning.py
app/soc/modules/ghop/views/models/task.py
app/soc/modules/ghop/views/models/timeline.py
--- a/app/soc/modules/ghop/logic/cleaning.py	Tue Sep 08 21:30:32 2009 +0200
+++ b/app/soc/modules/ghop/logic/cleaning.py	Wed Sep 09 20:15:53 2009 +0200
@@ -26,6 +26,8 @@
 from django.utils.translation import ugettext
 
 from soc.logic import cleaning
+from soc.logic import validate
+
 
 def cleanTaskComment(comment_field, action_field, ws_field):
   """Cleans the comment form and checks to see if there is either
@@ -63,7 +65,7 @@
   """Clean method to check and validate list of mentor's link_ids.
   """
 
-  @check_field_is_empty(field_name)
+  @cleaning.check_field_is_empty(field_name)
   def wrapper(self):
     """Decorator wrapped method.
     """
--- a/app/soc/modules/ghop/views/models/task.py	Tue Sep 08 21:30:32 2009 +0200
+++ b/app/soc/modules/ghop/views/models/task.py	Wed Sep 09 20:15:53 2009 +0200
@@ -301,7 +301,7 @@
 
     dynaproperties = params_helper.getDynaFields(dynafields)
     dynaproperties['clean_comment'] = cleaning.clean_html_content('comment')
-    dynaproperties['clean'] = ghop_cleaning.clean_comment(
+    dynaproperties['clean'] = ghop_cleaning.cleanTaskComment(
         'comment', 'action', 'work_submission')
 
     comment_form = dynaform.newDynaForm(dynamodel=None, 
--- a/app/soc/modules/ghop/views/models/timeline.py	Tue Sep 08 21:30:32 2009 +0200
+++ b/app/soc/modules/ghop/views/models/timeline.py	Wed Sep 09 20:15:53 2009 +0200
@@ -24,6 +24,8 @@
 
 
 from soc.logic import dicts
+from soc.views.helper import decorators
+from soc.views.models import timeline
 
 from soc.modules.ghop.logic.models import program as ghop_program_logic
 from soc.modules.ghop.logic.models import timeline as ghop_timeline_logic