resource.py 574 B

123456789101112131415
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from crud.base import CrudManager
  4. from models.resource import WorkCategory, WorkResource, ExamCategory, ExamResource, ResourceCollectInfo
  5. crud_work_category = CrudManager(WorkCategory)
  6. crud_work_resource = CrudManager(WorkResource)
  7. crud_exam_category = CrudManager(ExamCategory)
  8. crud_exam_resource = CrudManager(ExamResource)
  9. crud_collection = CrudManager(ResourceCollectInfo)
  10. CATEGORY_CRUDS = {"work": crud_work_category, "exam": crud_exam_category}
  11. RESOURCE_CRUDS = {"work": crud_work_resource, "exam": crud_exam_resource}