MICROBA-921 Standardize imports within the certificates app for consistency (#26131)
This commit is contained in:
@@ -17,14 +17,13 @@ from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from lms.djangoapps.certificates.api import get_certificate_for_user, get_certificates_for_user
|
||||
from lms.djangoapps.certificates.apis.v0.permissions import IsOwnerOrPublicCertificates
|
||||
from openedx.core.djangoapps.catalog.utils import get_course_run_details
|
||||
from openedx.core.djangoapps.certificates.api import certificates_viewable_for_course
|
||||
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
|
||||
from openedx.core.djangoapps.user_api.accounts.api import visible_fields
|
||||
from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser
|
||||
|
||||
from .permissions import IsOwnerOrPublicCertificates
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CertificatesConfig(AppConfig):
|
||||
"""
|
||||
# Can't import models at module level in AppConfigs, and models get
|
||||
# included from the signal handlers
|
||||
from . import signals # pylint: disable=unused-import
|
||||
from lms.djangoapps.certificates import signals # pylint: disable=unused-import
|
||||
if settings.FEATURES.get('ENABLE_SPECIAL_EXAMS'):
|
||||
from .services import CertificateService
|
||||
from lms.djangoapps.certificates.services import CertificateService
|
||||
set_runtime_service('certificates', CertificateService())
|
||||
|
||||
@@ -8,10 +8,9 @@ import logging
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from lms.djangoapps.certificates.models import GeneratedCertificate
|
||||
from lms.djangoapps.utils import _get_key
|
||||
|
||||
from .models import GeneratedCertificate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -11,10 +11,9 @@ from django.contrib.auth.models import User
|
||||
from edx_django_utils.monitoring import set_code_owner_attribute
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from lms.djangoapps.certificates.api import generate_user_certificates
|
||||
from lms.djangoapps.verify_student.services import IDVerificationService
|
||||
|
||||
from .api import generate_user_certificates
|
||||
|
||||
logger = getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Aggregate all views exposed by the certificates app.
|
||||
"""
|
||||
from .support import *
|
||||
from .webview import *
|
||||
from .xqueue import *
|
||||
from lms.djangoapps.certificates.views.support import *
|
||||
from lms.djangoapps.certificates.views.webview import *
|
||||
from lms.djangoapps.certificates.views.xqueue import *
|
||||
|
||||
Reference in New Issue
Block a user