Changed GHOP module imports to be consistent with rest of Melange code.
authorMadhusudan C.S. <madhusudancs@gmail.com>
Mon, 08 Jun 2009 08:48:24 +0200
changeset 2407 e23fce20ad3a
parent 2406 6f966e1a80bc
child 2408 726183fad650
Changed GHOP module imports to be consistent with rest of Melange code. The imports used the from <module-path> import <module> as <local_module_name> syntax. These kinds of imports are changed to import <module_path.module_name> syntax to be consistent with the Melange code base. Reviewed by: Lennard de Rijk
app/soc/modules/ghop/logic/models/comment.py
app/soc/modules/ghop/logic/models/mentor.py
app/soc/modules/ghop/logic/models/org_admin.py
app/soc/modules/ghop/logic/models/org_prize_assignment.py
app/soc/modules/ghop/logic/models/organization.py
app/soc/modules/ghop/logic/models/program.py
app/soc/modules/ghop/logic/models/task.py
app/soc/modules/ghop/logic/models/timeline.py
app/soc/modules/ghop/logic/models/work_submission.py
app/soc/modules/ghop/models/org_prize_assignment.py
app/soc/modules/ghop/models/task.py
--- a/app/soc/modules/ghop/logic/models/comment.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/comment.py	Mon Jun 08 08:48:24 2009 +0200
@@ -27,14 +27,14 @@
 
 import soc.models.comment
 
-from soc.modules.ghop.models import comment as ghop_comment_model
+import soc.modules.ghop.models.comment
 
 
 class Logic(comment.Logic):
   """Logic methods for the GHOPComment model.
   """
 
-  def __init__(self, model=ghop_comment_model.GHOPComment,
+  def __init__(self, model=soc.modules.ghop.models.comment.GHOPComment,
                base_model=soc.models.comment.Comment,
                scope_logic=linkable_logic):
     """Defines the name, key_name and model for this entity.
--- a/app/soc/modules/ghop/logic/models/mentor.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/mentor.py	Mon Jun 08 08:48:24 2009 +0200
@@ -26,17 +26,17 @@
 
 import soc.models.mentor
 
-from soc.modules.ghop.logic.models import organization as ghop_org_logic
-from soc.modules.ghop.models import mentor as ghop_mentor_model
+import soc.modules.ghop.logic.models.organization
+import soc.modules.ghop.models.mentor
 
 
 class Logic(mentor.Logic):
   """Logic methods for the GHOPMentor model.
   """
 
-  def __init__(self, model=ghop_mentor_model.GHOPMentor,
+  def __init__(self, model=soc.modules.ghop.models.mentor.GHOPMentor,
                base_model=soc.models.mentor.Mentor,
-               scope_logic=ghop_org_logic):
+               scope_logic=soc.modules.ghop.logic.models.organization):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/logic/models/org_admin.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/org_admin.py	Mon Jun 08 08:48:24 2009 +0200
@@ -26,17 +26,17 @@
 
 import soc.models.org_admin
 
-from soc.modules.ghop.logic.models import organization as ghop_org_logic
-from soc.modules.ghop.models import org_admin as ghop_org_admin_model
+import soc.modules.ghop.logic.models.organization
+import soc.modules.ghop.models.org_admin
 
 
 class Logic(org_admin.Logic):
   """Logic methods for the GHOPOrgAdmin model.
   """
 
-  def __init__(self, model=ghop_org_admin_model.GHOPOrgAdmin,
+  def __init__(self, model=soc.modules.ghop.models.org_admin.GHOPOrgAdmin,
                base_model=soc.models.org_admin.OrgAdmin,
-               scope_logic=ghop_org_logic):
+               scope_logic=soc.modules.ghop.logic.models.organization):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/logic/models/org_prize_assignment.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/org_prize_assignment.py	Mon Jun 08 08:48:24 2009 +0200
@@ -24,15 +24,17 @@
 
 from soc.logic.models import base
 
-from soc.modules.ghop.models import org_prize_assignment_model
+import soc.modules.ghop.models.org_prize_assignment
 
 
 class Logic(base.Logic):
   """Logic methods for the GHOPOrgPrizeAssigment model.
   """
 
-  def __init__(self, model=org_prize_assignment_model.GHOPOrgPrizeAssignment,
-               base_model=None, scope_logic=None):
+  def __init__(
+      self, model=\
+      soc.modules.ghop.models.org_prize_assignment.GHOPOrgPrizeAssignment,
+      base_model=None, scope_logic=None):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/logic/models/organization.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/organization.py	Mon Jun 08 08:48:24 2009 +0200
@@ -26,17 +26,18 @@
 
 import soc.models.organization
 
-from soc.modules.ghop.logic.models import program as ghop_program_logic
-from soc.modules.ghop.models import organization as ghop_organization_model
+import soc.modules.ghop.logic.models.program
+import soc.modules.ghop.models.organization
 
 
 class Logic(organization.Logic):
   """Logic methods for the GHOPOrganization model.
   """
 
-  def __init__(self, model=ghop_organization_model.GHOPOrganization,
-               base_model=soc.models.organization.Organization, 
-               scope_logic=ghop_program_logic):
+  def __init__(
+      self, model=soc.modules.ghop.models.organization.GHOPOrganization,
+      base_model=soc.models.organization.Organization, 
+      scope_logic=soc.modules.ghop.logic.models.program):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/logic/models/program.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/program.py	Mon Jun 08 08:48:24 2009 +0200
@@ -27,14 +27,14 @@
 
 import soc.models.program
 
-from soc.modules.ghop.models import program as ghop_program_model
+import soc.modules.ghop.models.program
 
 
 class Logic(program.Logic):
   """Logic methods for the GHOPProgram model.
   """
 
-  def __init__(self, model=ghop_program_model.GHOPProgram,
+  def __init__(self, model=soc.modules.ghop.models.program.GHOPProgram,
                base_model=soc.models.program.Program,
                scope_logic=sponsor_logic):
     """Defines the name, key_name and model for this entity.
--- a/app/soc/modules/ghop/logic/models/task.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/task.py	Mon Jun 08 08:48:24 2009 +0200
@@ -26,17 +26,17 @@
 
 import soc.models.linkable
 
-from soc.modules.ghop.logic.models import organization as ghop_org_logic
-from soc.modules.ghop.models import task as ghop_task_model
+import soc.modules.ghop.logic.models.organization
+import soc.modules.ghop.models.task
 
 
 class Logic(linkable.Logic):
   """Logic methods for the GHOPTask model.
   """
 
-  def __init__(self, model=ghop_task_model.GHOPTask,
+  def __init__(self, model=soc.modules.ghop.models.task.GHOPTask,
                base_model=soc.models.linkable.Linkable, 
-               scope_logic=ghop_org_logic):
+               scope_logic=soc.modules.ghop.logic.models.organization):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/logic/models/timeline.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/timeline.py	Mon Jun 08 08:48:24 2009 +0200
@@ -27,14 +27,14 @@
 
 import soc.models.timeline
 
-from soc.modules.ghop.models import timeline as ghop_timeline_model
+import soc.modules.ghop.models.timeline
 
 
 class Logic(timeline.Logic):
   """Logic methods for the GHOPTimeline model.
   """
 
-  def __init__(self, model=ghop_timeline_model.GHOPTimeline,
+  def __init__(self, model=soc.modules.ghop.models.timeline.GHOPTimeline,
                base_model=soc.models.timeline.Timeline,
                scope_logic=sponsor_logic):
     """Defines the name, key_name and model for this entity.
--- a/app/soc/modules/ghop/logic/models/work_submission.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/work_submission.py	Mon Jun 08 08:48:24 2009 +0200
@@ -25,18 +25,19 @@
 
 import soc.models.linkable
 
-from soc.modules.ghop.logic.models import organization as ghop_org_logic
-from soc.modules.ghop.models import work_submission as \
-    ghop_work_submission_model
+import soc.modules.ghop.logic.models.organization
+import soc.modules.ghop.models.work_submission
 
 
 class Logic(linkable.Logic):
   """Logic methods for the GHOPWorkSubmission model.
   """
 
-  def __init__(self, model=ghop_work_submission_model.GHOPWorkSubmission,
-               base_model=soc.models.linkable.Linkable, 
-               scope_logic=ghop_org_logic):
+  def __init__(
+      self,
+      model=soc.modules.ghop.models.work_submission.GHOPWorkSubmission,
+      base_model=soc.models.linkable.Linkable, 
+      scope_logic=soc.modules.ghop.logic.models.organization):
     """Defines the name, key_name and model for this entity.
     """
 
--- a/app/soc/modules/ghop/models/org_prize_assignment.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/models/org_prize_assignment.py	Mon Jun 08 08:48:24 2009 +0200
@@ -26,8 +26,8 @@
 
 import soc.models.base
 
-from soc.modules.ghop.models import organization as ghop_organization_model
-from soc.modules.ghop.models import program as ghop_program_model
+import soc.modules.ghop.models.organization
+import soc.modules.ghop.models.program
 
 
 class GHOPOrgPrizeAssignment(soc.models.base.ModelWithFieldAttributes):
@@ -36,12 +36,12 @@
 
   #: Program to which these winners belong to
   program = db.ReferenceProperty(
-      reference_class=ghop_program_model.GHOPProgram,
+      reference_class=soc.modules.ghop.models.program.GHOPProgram,
       required=True, collection_name='program_prizes')
 
   #: Organization to which these winners belong to
   org = db.ReferenceProperty(
-      reference_class=ghop_organization_model.GHOPOrganization,
+      reference_class=soc.modules.ghop.models.organization.GHOPOrganization,
       required=True, collection_name='organization_prizes')
 
   #: Ordered list of winners(reference to Student entities) for the given
--- a/app/soc/modules/ghop/models/task.py	Mon Jun 08 08:42:13 2009 +0200
+++ b/app/soc/modules/ghop/models/task.py	Mon Jun 08 08:48:24 2009 +0200
@@ -32,7 +32,7 @@
 import soc.models.student
 import soc.models.user
 
-from soc.modules.ghop.models import program as ghop_program_model
+import soc.modules.ghop.models.program
 
 
 class GHOPTask(soc.models.linkable.Linkable):
@@ -93,7 +93,7 @@
 
   #: Program in which this Task has been created
   program = db.ReferenceProperty(
-      reference_class=ghop_program_model.GHOPProgram,
+      reference_class=soc.modules.ghop.models.program.GHOPProgram,
       required=True, collection_name='tasks')
 
   #: Required property which holds the state, the Task is currently in.