From: Guillaume Pellerin Date: Mon, 25 Jan 2021 16:32:28 +0000 (+0100) Subject: add import X-Git-Tag: 0.9-tc~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b593a52e73fccf948e418367e7e981a4e3dc16eb;p=teleforma.git add import --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 2b4ac368..8c4859c2 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -292,9 +292,11 @@ class CourseListView(CourseAccessMixin, ListView): @jsonrpc_method('teleforma.get_course_type_list') def get_course_type_list(request): + from teleforma.models import CourseType return [course_type.to_dict() for course_type in CourseType.objects.all()] def pull(request, organization_name): + from teleforma.models import Organization, Department organization = Organization.objects.get(name=organization_name) departments = Department.objects.filter(organization=organization) for department in departments: