Django app not detected on runserver

Hi, i have create a django app that I installed using pip.

Following the doc (Open edX development — Tutor documentation), i manage to make it work but on local only. The urls and config are detected from the of my app following this doc (edx-django-utils/README.rst at master · edx/edx-django-utils · GitHub)

I have rebuild both openedx and openedx-dev.

When i run tutor local start: I can access the urls of my new app.
When i run tutor dev runserver lms: I have a 404 on my app urls.

I have try to tutor dev run lms bash and then import my app from the django shell.
It does not work.

It is possible that the /build/openedx/requirements folder was only copy in the openedx image and not the openedx-dev one ?

Thanks for you help.

Ok, here is what I did to make my custom Django app working in dev mode "(tutor dev runserver lms).

First, i wanted to see if the “requirements” folder containing my apps and the “private.txt” file was in the container and yes it was there.

So i did a “pip freeze” inside the dev container and i notice that my app was not pip installed.

So I “pip install -r …/requirements/private.txt”.

Now everything work in dev mode. I can develop my app without having to build the image all the time!

Should we run the pip install from the openedx-dev/DockerFile ?

It will be nice to not have to go inside the dev container to install the private requirements.

These steps should have taken care of installing your package in the openedx and openedx-dev images. Are you quite sure that the images were properly rebuilt?

Yes, I also tried with --no-cache, rebuilt after docker prune, building openedx-dev before openedx.

Each time, the private.txt requirements was not installed in the openedx-dev.

It was working on the openedx image only.

What’s the name of your python package? Could it be that it is being overwritten by an upstream package in edx-platform/requirements/edx/development.txt?

I don’t think so…

Capture d’écran, le 2021-11-09 à 09.52.37
Capture d’écran, le 2021-11-09 à 09.52.45

And what’s the name of the package, as defined in ./teacheroedx-users/ (or setup.cfg)?

Capture d’écran, le 2021-11-09 à 10.19.35

I don’t understand what is going on. If your requirements are in the “openedx” Docker image, they should also be in “openedx-dev”. Can you tell us a little about your environment? OS, tutor version, etc. Also, can you paste the entire output of tutor images build openedx-dev?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.