**hi , i use django framework to build website , but can i use node into django framework ??? i do not have any idea to make it **
Django is a Python-based content management system with lots of support and plenty of extensions.
A quick search showed that it supports MQTT which would probably be the easiest way to be able to send data from Node-RED to Django and back. If you don't want to use MQTT, you seem to be able to use Websockets.
The actual mechanics are going to depend on whether Django and Node-RED are running on devices on the same network or not, how much control you have over the Django server and exactly what you want to actually do.
The idea i want to use is to put dashboard of node red into djago web page, node red is very easy in use mqtt or websokets ..... but authentication and authorization in django is very easy, and i can't find any tutorial about how can i build website by node red
Django and Node-RED both provide their own web servers. You can ensure that their web endpoints don't overlap and use both in parallel but I don't believe you can run Node-RED within Django as such.
Node-RED uses Node.js with the ExpressJS web server. You can certainly embed Node-RED into another node.js/ExpressJS app but not into a Python app.
I found a way to connect django web page with node red by use websocket As
you mentioned , i thank by this way i can connect any web frameworks with node red ..before i used node red , i use django with mqtt with coap with three database and It was very tiring and very costly in terms of time... Once something went wrong, it was hard to tell where the error was or even a matter of adjusting anything.
MQTT should be very reliable. Actually, it should be more reliable than a direct websocket. Since it is designed to be a message q hub between systems. If you were using with COAP though, you probably weren't using Mosquitto broker?
I meant to using mqtt and coap to access embedded circuits to collect data and Then store the data coming from it and after that show this data on website and give access to send instructions from webpage to embedded circuits ....... but can i use mqtt in webpage without Websockets...?
You can get front-end libraries that will talk direct to your broker over websockets if you really want to. However, in your case, there are libraries that will integrate between the broker and the Django server so that data can be exchanged. That is usually a better option since it keeps the broker away from user access.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.