From 8c83a5f0cee1f99f57d680f914241cfde0205b4c Mon Sep 17 00:00:00 2001 From: "Espen A. Kristiansen" Date: Mon, 25 Jul 2011 04:02:45 +0200 Subject: [PATCH] apps.student.simplifiedmetabases: Moved to coreutils.simplified.metabases. --- devilry/apps/administrator/simplified.py | 17 ++++++++++------- devilry/apps/examiner/simplified.py | 13 +++++++++---- devilry/apps/student/simplified.py | 15 ++++++++++----- devilry/coreutils/__init__.py | 1 + devilry/coreutils/simplified/__init__.py | 0 .../simplified/metabases/__init__.py} | 4 ++-- 6 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 devilry/coreutils/__init__.py create mode 100644 devilry/coreutils/simplified/__init__.py rename devilry/{apps/student/simplifiedmetabases.py => coreutils/simplified/metabases/__init__.py} (99%) diff --git a/devilry/apps/administrator/simplified.py b/devilry/apps/administrator/simplified.py index 6444140cf6..eec0fcd6a1 100644 --- a/devilry/apps/administrator/simplified.py +++ b/devilry/apps/administrator/simplified.py @@ -1,17 +1,20 @@ from ...simplified import (SimplifiedModelApi, simplified_modelapi, PermissionDenied, FieldSpec, - FilterSpecs, FilterSpec, ForeignFilterSpec, PatternFilterSpec) + FilterSpecs, FilterSpec, PatternFilterSpec) from ..core import models - -from ..student.simplifiedmetabases import (SimplifiedSubjectMetaMixin, - SimplifiedPeriodMetaMixin, SimplifiedAssignmentMetaMixin, - SimplifiedAssignmentGroupMetaMixin, SimplifiedDeadlineMetaMixin, - SimplifiedDeliveryMetaMixin, SimplifiedStaticFeedbackMetaMixin, - SimplifiedFileMetaMetaMixin) +from devilry.coreutils.simplified.metabases import (SimplifiedSubjectMetaMixin, + SimplifiedPeriodMetaMixin, + SimplifiedAssignmentMetaMixin, + SimplifiedAssignmentGroupMetaMixin, + SimplifiedDeadlineMetaMixin, + SimplifiedDeliveryMetaMixin, + SimplifiedStaticFeedbackMetaMixin, + SimplifiedFileMetaMetaMixin) __all__ = ('SimplifiedNode', 'SimplifiedSubject', 'SimplifiedPeriod', 'SimplifiedAssignment') + class CanSaveBase(SimplifiedModelApi): """ Mixin class extended by many of the classes in the Simplified API for Administrator """ @classmethod diff --git a/devilry/apps/examiner/simplified.py b/devilry/apps/examiner/simplified.py index 7a5fdf2077..337120d4f5 100644 --- a/devilry/apps/examiner/simplified.py +++ b/devilry/apps/examiner/simplified.py @@ -1,9 +1,14 @@ from ...simplified import SimplifiedModelApi, simplified_modelapi, PermissionDenied, FieldSpec from ..core import models -from ..student.simplifiedmetabases import (SimplifiedSubjectMetaMixin, SimplifiedFileMetaMetaMixin, - SimplifiedPeriodMetaMixin, SimplifiedAssignmentMetaMixin, - SimplifiedAssignmentGroupMetaMixin, SimplifiedDeadlineMetaMixin, - SimplifiedDeliveryMetaMixin, SimplifiedStaticFeedbackMetaMixin,) +from devilry.coreutils.simplified.metabases import (SimplifiedSubjectMetaMixin, + SimplifiedFileMetaMetaMixin, + SimplifiedPeriodMetaMixin, + SimplifiedAssignmentMetaMixin, + SimplifiedAssignmentGroupMetaMixin, + SimplifiedDeadlineMetaMixin, + SimplifiedDeliveryMetaMixin, + SimplifiedStaticFeedbackMetaMixin,) + class PublishedWhereIsExaminerMixin(SimplifiedModelApi): diff --git a/devilry/apps/student/simplified.py b/devilry/apps/student/simplified.py index 47579218b3..634ba1e8ef 100644 --- a/devilry/apps/student/simplified.py +++ b/devilry/apps/student/simplified.py @@ -1,11 +1,16 @@ from datetime import datetime from ...simplified import simplified_modelapi, SimplifiedModelApi, PermissionDenied -from simplifiedmetabases import (SimplifiedSubjectMetaMixin, SimplifiedPeriodMetaMixin, - SimplifiedAssignmentMetaMixin, SimplifiedAssignmentGroupMetaMixin, - SimplifiedDeadlineMetaMixin, SimplifiedDeliveryMetaMixin, - SimplifiedStaticFeedbackMetaMixin, SimplifiedFileMetaMetaMixin) -from restfulmetabases import DeadlineExtjsModelMeta +from devilry.coreutils.simplified.metabases import (SimplifiedSubjectMetaMixin, + SimplifiedPeriodMetaMixin, + SimplifiedAssignmentMetaMixin, + SimplifiedAssignmentGroupMetaMixin, + SimplifiedDeadlineMetaMixin, + SimplifiedDeliveryMetaMixin, + SimplifiedStaticFeedbackMetaMixin, + SimplifiedFileMetaMetaMixin) + + class PublishedWhereIsCandidateMixin(SimplifiedModelApi): """ Mixin class extended by all classes in the Simplified API for Student using the Simplified API """ diff --git a/devilry/coreutils/__init__.py b/devilry/coreutils/__init__.py new file mode 100644 index 0000000000..08bfefd503 --- /dev/null +++ b/devilry/coreutils/__init__.py @@ -0,0 +1 @@ +""" Utility functions and classes shared by many applicaitons that uses apps.core. """ diff --git a/devilry/coreutils/simplified/__init__.py b/devilry/coreutils/simplified/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/devilry/apps/student/simplifiedmetabases.py b/devilry/coreutils/simplified/metabases/__init__.py similarity index 99% rename from devilry/apps/student/simplifiedmetabases.py rename to devilry/coreutils/simplified/metabases/__init__.py index ed4da2b3cf..a5d32047cc 100644 --- a/devilry/apps/student/simplifiedmetabases.py +++ b/devilry/coreutils/simplified/metabases/__init__.py @@ -1,5 +1,5 @@ -from ..core import models -from ...simplified import FieldSpec, FilterSpec, FilterSpecs, PatternFilterSpec, ForeignFilterSpec +from devilry.apps.core import models +from devilry.simplified import FieldSpec, FilterSpec, FilterSpecs, PatternFilterSpec, ForeignFilterSpec class SimplifiedSubjectMetaMixin(object):