How can I use django to call a python script and return the result in realtime?

HI everyone, I’m new in django and I don’t know how to get some result from my python scrip and show in web page, I think that can be done with django but I don’t know how.


X = 1+1

How can i get X in django?

Start here

Writing your first Django app

I’ve read about views, models, urls…etc but I can’t find anything explaining how to use my python scripts that I usually use on a daily basis to create my RPA automations, how I pass the variables of my scripts external to django, like this simple that I showed, how do I see variables from or how do I pass variables to

This is not related to django, but with python itself.
With you want to use a script, turn it into a function, import it when you want to use it and then use the result.

Opa beleza leandro? com esse nome imagino que seja Brasileiro kkkkk Entendi, vou ver direitinho como vou fazer , eu pensei no caso de eu ter varios scripts, eu poderia apenas pegar o retorno de dentro deles, mas faz sentido transformar eles em funções.

Yeah, i’m Brazilian too!
Good luck buddy!

1 Like