How I can run a Python file, or Django file from Django view. I'm trying to make like iPython notebook, but use just text editor.
I have create view, in this view I'm simply add Python(Django) text.
Then when smb requests some view, which processes this Python(Django) file, I should send response with result.
For example, print result of query set.
In create view, I've added text:
from main.models import User
for i in User.objects.all()
print(i)
And in view I get request and send response with result of execution of code above.
If I understand well you want to run some function inside of your view that is stored in and external file. If so just put the file in your app root directory and import it in your views.py
from your_app.your_file import your_method