1👍
Your 2nd option is more suggested. What you can do is:
-
Create
utils.py
in the app folder where your views.py is situated. -
Inside views:
from utils import test_tool test_tool(x,y)
Source:stackexchange.com
1👍
Your 2nd option is more suggested. What you can do is:
Create utils.py
in the app folder where your views.py is situated.
Inside views:
from utils import test_tool
test_tool(x,y)