app/soc/logic/models/survey.py
changeset 2443 2e86dbd47907
parent 2442 dd1f94c3594c
child 2444 6276c3340c30
--- a/app/soc/logic/models/survey.py	Sun Jun 28 23:58:03 2009 +0200
+++ b/app/soc/logic/models/survey.py	Mon Jun 29 13:50:03 2009 +0200
@@ -405,8 +405,32 @@
     # return the scope
     return entity.scope
 
+class ProjectLogic(Logic):
+  """Logic class for ProjectSurvey.
+  """
+
+  def __init__(self, model=ProjectSurvey,
+               base_model=None, scope_logic=None):
+    """Defines the name, key_name and model for this entity.
+    """
+
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic)
+
+
+class GradingProjectLogic(ProjectLogic):
+  """Logic class for GradingProjectSurvey
+  """
+
+  def __init__(self, model=GradingProjectSurvey,
+               base_model=None, scope_logic=None):
+    """Defines the name, key_name and model for this entity.
+    """
+
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic)
+
 
 logic = Logic()
-# TODO separate project and grading logic into own class to overwrite methods
-project_logic = Logic(model=ProjectSurvey)
-grading_logic = Logic(model=GradingProjectSurvey)
+project_logic = ProjectLogic()
+grading_logic = GradingProjectLogic()