Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nsprenkle committed Aug 15, 2024
1 parent 5720d4a commit b1a21a2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/xblock-tutorial/edx_platform/overrides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ implementation.

This can be done by:

1. Creating an XBlock in a new or existing Django Plugin, installed into ``edx-platform``.
1. Creating an XBlock in a new or existing package installed into ``edx-platform``.

2. Adding the ``xblock.v1.overrides`` entry point in ``setup.py``, pointing to your
custom XBlock.
Expand All @@ -28,8 +28,8 @@ Imagine there is an XBlock installed ``edx-platform``:

.. code:: python
# edx-platform/xblocks/twitch_plays_pokemon.py
class TwitchPlaysPokemonBlock(XBlock):
# edx-platform/xblocks/video_block.py
class VideoBlock(XBlock):
...
# edx-platform/setup.py
Expand All @@ -38,33 +38,33 @@ Imagine there is an XBlock installed ``edx-platform``:
entry_points={
"xblock.v1": [
"tpp = xblocks.twitch_plays_pokemon::TwitchPlaysPokemonBlock"
"video = xblocks.video_block::VideoBlock"
# ...
]
}
)
If you then create your own Plugin App with a custom version of that XBlock...
If you then create your own Python package with a custom version of that XBlock...

.. code:: python
# your_plugin/xblocks/twitch_plays_pokemon.py
class YourTwitchPlaysPokemonBlock(XBlock):
# your_plugin/xblocks/video_block.py
class YourVideoBlock(XBlock):
...
# your_plugin/setup.py
setup(
# ...
entry_points={
"xblock.v1.overrides": [
"tpp = your_plugin.twitch_plays_pokemon::YourTwitchPlaysPokemonBlock"
"tpp = your_plugin.xblocks.video_block::YourVideoBlock"
# ...
],
}
)
And install that app as a Django plugin, then your block should be loaded instead of the
existing implementation.
And install that package into your virtual environment, then your block should be
loaded instead of the existing implementation.

.. note::

Expand Down

0 comments on commit b1a21a2

Please sign in to comment.