Can I use Django for client-server communication ?

458 views
Skip to first unread message

Sharanagouda Biradar

unread,
Apr 22, 2020, 9:22:07 AM4/22/20
to Django users
HI,

I have developed a python application(GUI using Tkinter)  which triggers python test scripts automatically and gives the result But now I want to launch this GUI App on multiple  machines using a single machine(something like server-client model), also I want to set required config parameters in client machine using server itself. Can I achieve all this using Django? I am very much new to Django and need to know if I can achieve this using Django. if not kindly let me know what tool I can use to achieve this?

mohamed khaled

unread,
Apr 24, 2020, 12:19:57 AM4/24/20
to Django users
if you have different apps in a different platform or like a desktop app or mobile app you communicate with them or with a website using API in Django has a very good package called Django REST framework you can take your result of your GUI you can serialize or convert this data to JSON and send it your app in Django app website and parse or take this JSON data and translate to a dataset 

Derek

unread,
Apr 24, 2020, 7:24:57 AM4/24/20
to Django users
Its unclear what you are trying to achieve; in a client-server architecture, the clients will call the server, which in turn may start up processes on their behalf and return responses to them.  The reverse is not true. A server cannot install or startup up processes on independent client machines.

I assume what you meant was: a client will install your desktop GUI on their machine, run it, and then want to return the results to a central location (the server).  In this case, the GUI could (behind the scenes) make a call to, say, the Django DRF (https://www.django-rest-framework.org/ ) to send those results.  You could then have a front-end (also developed using Django) running on that same server which could analyse and present those results e.g. aggregate them for all your clients.  The DRF could of course also be called on by the desktop to provide information (e.g. your special parameters or other data that can be used by the GUI).

On Wednesday, 22 April 2020 15:22:07 UTC+2, Sharanagouda Biradar wrote:

Sharanagouda Biradar

unread,
May 12, 2020, 10:06:29 AM5/12/20
to Django users
Let me re-phrase my question.

I have a basic (server1) Django development web server and another server (ex:server2) - (actually multiple windows 10 machines not just 1 machine.) which has a python/batch script that launches a python application. Assume that the server1 has necessary authentication in place to run the script on server2. All I want to do is, click a button on the django website which would run the python script sitting on server2. Now can this be achieved using Django REST APIs? or how else can i achieve this? help is highly appreciated.

PS: reply from Mohammed Khalid seems its possible using Django REST Framework, just need one more confirmation as i have re-phrased my question.
Reply all
Reply to author
Forward
0 new messages