DJANGO app loose path from batch file

25 views
Skip to first unread message

Xristos Xristoou

unread,
Nov 6, 2017, 10:43:36 AM11/6/17
to Django users

I try to learn more about Django celery and rabbitmq to create some async tasks and I have some question.

Some programs can provide PYTHON API to can some development to use modules from this program in python.

one most way to take that PYTHON API from this program is to use batch file like this :

@echo off
SET PROGRAM_ROOT=C:\main-folder
call "%PROGRAM_ROOT%"\bin\some-batch-file.bat

SET PYCHARM="C:\Program Files\JetBrains\PyCharm 2017.1.5\bin\pycharm64.exe"

set PYTHONPATH=%PYTHONPATH%;%PROGRAM_ROOT%\python;
set PYTHONPATH=%PYTHONPATH%;%PROGRAM_ROOT%\site-packages;


start "PyCharm aware of PROGRAM" /B %PYCHARM% %*

if I run this batch file can I use all imports and modules from this program.

that to release if add celery in my app and broker url rabbitmq server then if i use some module or some import from this python api then I take error message : no module name some_module_from_program (for all other modules celery and rabbitmq app work fine).

that mean in celery and rabbitmq server loose that paths from batch file and I take this error.

my question how to can define rabbitmq server to start server with that paths like batch file before to avoid this error?

Daniel Roseman

unread,
Nov 6, 2017, 1:03:54 PM11/6/17
to Django users
Your question is quite hard to understand. But certainly instead of creating a batch file to set paths, you should be using a virtualenv.
-- 
DR

Xristos Xristoou

unread,
Nov 6, 2017, 1:12:09 PM11/6/17
to Django users


i am windows user

Mike Morris

unread,
Nov 6, 2017, 3:49:16 PM11/6/17
to django...@googlegroups.com
On 11/06/2017 10:12 AM, Xristos Xristoou wrote:
>
> i am windows user

My condolences.

Reply all
Reply to author
Forward
0 new messages