Run_gunicorn works, but not gunicorn_django, although they are in the same environment, cannot see the registration module

I have a problem here where I did "gunicorn_django" but it says "ImportError: No module named registration"

However, when I do python manage.py run_gunicorn , it works fine.

One way to verify that gunicorn_django and registration are in the same environment is when I deactivate it, I run gunicorn_django, it returns the command not found, and when I did python and try to import the registration, it did not find either.

However, when I used virtualenv "workon project name", "gunicorn_django" and "import registration" work.

What can I do? Please, help.

+6
source share
1 answer

This is the new django 1.4 project structure.

So, I get around this by doing this in my supervisor.conf

 command=/sites/.virtualenvs/<project>/bin/python /sites/<domain>/code/<project>/manage.py run_gunicorn -c /sites/<domain>/code/<project>/configs/prod/gunicorn.conf.py 
+4
source

Source: https://habr.com/ru/post/905733/


All Articles