fix: use import_string instead of get_storage_class to import the view class

This commit is contained in:
Daniel Wong
2025-06-17 17:05:02 -06:00
parent 2e9f000fe0
commit 89ae9e9571

View File

@@ -6,7 +6,7 @@ Implement CourseTab
import logging
from abc import ABCMeta
from django.core.files.storage import get_storage_class
from django.utils.module_loading import import_string
from xblock.fields import List
from edx_django_utils.plugins import PluginError
@@ -281,7 +281,7 @@ class TabFragmentViewMixin:
Returns the view that will be used to render the fragment.
"""
if not self._fragment_view:
self._fragment_view = get_storage_class(self.fragment_view_name)()
self._fragment_view = import_string(self.fragment_view_name)()
return self._fragment_view
def render_to_fragment(self, request, course, **kwargs):