Skip to content

openedx/web-fragments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ace3073 · Sep 13, 2024
Sep 9, 2024
Mar 31, 2024
Apr 1, 2024
Mar 31, 2024
Feb 3, 2017
Nov 12, 2019
Feb 3, 2017
Sep 10, 2022
Feb 3, 2017
Feb 3, 2017
Jul 29, 2022
Oct 31, 2023
Feb 3, 2017
Jun 25, 2020
Aug 21, 2020
Feb 15, 2023
Feb 3, 2017
Nov 11, 2019
Mar 31, 2024
Jun 25, 2020
Apr 1, 2024

Repository files navigation

web-fragments

PyPI CI Codecov Documentation Supported Python versions License

Overview

The web fragments library provides a Python and Django implementation for managing fragments of web pages. In particular, this library refactors the fragment code from XBlock into a standalone implementation.

A Django view subclass called FragmentView is provided which supports three different ways of rendering a fragment into a page:

  • the fragment can be rendered as a standalone page at its own URL
  • the fragment can be rendered into another page directly from Django
  • the fragment can be returned as JSON so that it can be rendered client-side

The rationale behind this design can be found in OEP-12.

The intention is that a client-side implementation will be provided in a subsequent version. This should provide JavaScript code to request fragements over AJAX and then dynamically update the current page. This logic will be a refactoring of the current implementation in edx-platform for rendering XBlocks. It is also intended that this functionality will enhance the capabilities around dependency loading.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

How To Contribute

Contributions are very welcome. Please read the Open edX Contributing Guide for details.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].

Getting Help

Have a question about this repository, or about Open edX in general? Please refer to the Open edX guide to Getting Help.