diff --git a/acid/acid.py b/acid/acid.py index 1adeaae..25f0acd 100644 --- a/acid/acid.py +++ b/acid/acid.py @@ -1,16 +1,15 @@ """An XBlock checking container/block relationships for correctness.""" import logging -import pkg_resources import random + +import pkg_resources import webob from lazy import lazy from mako.lookup import TemplateLookup - +from web_fragments.fragment import Fragment from xblock.core import XBlock, XBlockAside -from xblock.fields import Scope, Dict -from xblock.fragment import Fragment -import six +from xblock.fields import Dict, Scope def generate_fields(cls): @@ -335,8 +334,11 @@ def fallback_view(self, view_name, context=None): # pylint: disabl rendered_children=(fragment.content for fragment in rendered_children), local_resource_url=self.runtime.local_resource_url(self, 'public/test_data.json'), )) - frag.add_frag_resources(acid_fragment) - frag.add_frags_resources(rendered_children) + frag.add_fragment_resources(acid_fragment) + + for rendered_child in rendered_children: + frag.add_fragment_resources(rendered_child) + frag.add_javascript(self.resource_string('static/js/acid_parent.js')) frag.initialize_js('AcidParentBlock') return frag diff --git a/requirements/base.txt b/requirements/base.txt index 9df6f3f..25da38c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -20,7 +20,7 @@ markupsafe==2.1.5 # via # mako # xblock -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via xblock pytz==2024.1 # via xblock @@ -36,7 +36,7 @@ web-fragments==2.1.0 # via xblock webob==1.8.7 # via xblock -xblock==1.10.0 +xblock==2.0.0 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 15aafb2..96cc5db 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -13,7 +13,7 @@ # using LTS django version -Django<4.0 +Django<5.0 # elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. # elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index fb84d10..abed760 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -4,7 +4,7 @@ # # make upgrade # -build==1.0.3 +build==1.1.1 # via pip-tools click==8.1.7 # via pip-tools diff --git a/requirements/test.txt b/requirements/test.txt index 42b23c1..5c815ff 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -76,7 +76,7 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.12.3 +tomlkit==0.12.4 # via pylint typing-extensions==4.10.0 # via