I would suggest following:
(我建议如下:)
Your separate application establishes only one very simnple interface, that your django application can use.
(您单独的应用程序仅建立一个非常简单的界面,您的Django应用程序可以使用该界面。)
The only purpose is to tell your application, that there is data ready to fetch.
(唯一的目的是告诉您的应用程序,已经准备好获取数据。)
You could implement this via a simple TCP or UDP socket or via one dedicated http request.
(您可以通过一个简单的TCP或UDP套接字或一个专用的HTTP请求来实现。)
It doesn't really matter. (没关系。)
Whenever your application gets notified that there are things to do it will connect via dedicated django views to ask what data can be fetched and fetch the data.
(每当通知您的应用程序有事情要做时,它都会通过专用的django视图进行连接,以询问可以获取哪些数据并获取数据。)
you could use the django rest frame work. (您可以使用Django Rest框架。)
The whole point.
(整点。)
A django server is intended to provide data and to allow uploading data.
(Django服务器旨在提供数据并允许上传数据。)
Let your special application use django viewa to fetch and process data. (让您的特殊应用程序使用django viewa来获取和处理数据。)
Either your application polls periodically or if your app really has to react immediately implement one simple way, that allows django to notify your application.
(您的应用程序会定期轮询,或者如果您的应用程序确实必须立即做出反应,请实施一种简单的方法,该方法允许django通知您的应用程序。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…