Escachator
Escachator

Reputation: 1881

Can django do computations in the client?

I am about to design an app that requires to do some medium level of computation (training some small machine learning model).

I am thinking about designing the app with django. Was wondering if django can allow that some of these computations can be done in the client‘s browser, i.e. using its memory and cpu. Some initial tips of where to start looking at will be much appreciated.

Thanks

Upvotes: 1

Views: 495

Answers (2)

Jonathan Daniel
Jonathan Daniel

Reputation: 232

Yes, You would need to use Javascript and call views you made in Django. You can use any javascript library, also Vue if you need a framework.

Upvotes: 1

Christian Baker
Christian Baker

Reputation: 11

That's the reason Django is mostly used for building APIs. If you want the View (Template in Django) to update, a request would be made to the server's Controller (View in Django) to render a new version of the webpage. I would highly recommend a front end framework and just use Django for your api if you want to run client side computations.

Upvotes: 1

Related Questions