Running a python file other than views.py in django
Is this plot function a view where you are returning a response to the client or is this a helper function that you are trying to call from within a view? If it isn't a view, I would recommend adding from .plotting import plot to the top of your views.py file
I am running a django project and I want to divide up my python code into separate files. At the moment I am running my functions from views.py. In my views.py I have a plot function. I have taken this plotting code and I have created python file called plotting.py which has this plot function in it. this plotting file lives in the same folder as my views.py
My problem is accessing this plotting.py file. I am trying to access it through from the urls.py by path('plot', plotting.plot),. it is not working. Or do I have to link back to a function in views.pyand from tat function go toplotting.py`?