mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-11 17:38:46 +00:00
Add instructions for xblock development
As per https://discuss.overhang.io/t/best-practice-xblock-development-in-tutor-dev-mode/345
This commit is contained in:
parent
cf041568d0
commit
43e841b1cb
21
docs/dev.rst
21
docs/dev.rst
@ -108,6 +108,27 @@ To debug a local edx-platform repository, add a ``import ipdb; ipdb.set_trace()`
|
|||||||
|
|
||||||
tutor dev runserver -v /path/to/edx-platform:/openedx/edx-platform lms
|
tutor dev runserver -v /path/to/edx-platform:/openedx/edx-platform lms
|
||||||
|
|
||||||
|
XBlock and edx-platform plugin development
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
In some cases you will have to develop features for packages that are pip-installed next to edx-platform. This is quite easy with Tutor. Just add your packages to the `$(tutor config printroot)/env/build/openedx/requirements/private.txt`` file. To avoid re-building the openedx Docker image at every change, you should add your package in editable mode. For instance::
|
||||||
|
|
||||||
|
echo "-e ./mypackage" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"
|
||||||
|
|
||||||
|
The ``requirements`` folder should have the following content::
|
||||||
|
|
||||||
|
env/build/openedx/requirements/
|
||||||
|
private.txt
|
||||||
|
mypackage/
|
||||||
|
setup.py
|
||||||
|
...
|
||||||
|
|
||||||
|
You will have to re-build the openedx Docker image once::
|
||||||
|
|
||||||
|
tutor images build openedx
|
||||||
|
|
||||||
|
You should then run the development server as usual, with ``runserver``. Every change made to the ``mypackage`` folder will be picked up and the development server will be automatically reloaded.
|
||||||
|
|
||||||
.. _theming:
|
.. _theming:
|
||||||
|
|
||||||
Customised themes
|
Customised themes
|
||||||
|
@ -47,7 +47,7 @@ This is not an error with Tutor, but with your Docker installation. This is freq
|
|||||||
|
|
||||||
docker run --rm hello-world
|
docker run --rm hello-world
|
||||||
|
|
||||||
If the above command does not work, you should fix your Docker installation. Some people will suggest to run Docker as root, or with `sudo`; *do not do this*. Instead, what you should probably do is to add your user to the "docker" group. For more information, check out the `official Docker installation instructions <https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user>`__.
|
If the above command does not work, you should fix your Docker installation. Some people will suggest to run Docker as root, or with ``sudo``; **do not do this**. Instead, what you should probably do is to add your user to the "docker" group. For more information, check out the `official Docker installation instructions <https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user>`__.
|
||||||
|
|
||||||
Help! The Docker containers are eating all my RAM/CPU/CHEESE
|
Help! The Docker containers are eating all my RAM/CPU/CHEESE
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user