Can you define what you mean by real-time?
There are many way to achieve this depending on your other needs, for
instance if you need the server (the raspberrypi) to push the data,
it's suddenly not really a beginners task as you have to think about
whether to use websockets , or long polling. (or other complex
strategies which haven't immediately come to mind)
If however you are happy with the client to drive the update rate; by
say,  refreshing the page every few seconds (or perhaps longer) then
you can get away with a pretty simple django app with a single view
(your webpage with the sensor data) and have that webpage auto redirect
to itself at your refresh period.
In the latter case follow the tutorial to learn the basics, then write
an app with a single template which looks good, and you can use your
view function to fetch your sensor data and insert it into the template
context. If that isn't clear, hopefully the tutorial will help .
On Tue, 2019-10-15 at 09:43 -0700, 佟博 wrote:
> I need to build a website with django and pass the sensor data on
> rasperrypi to the webpage in real time. What should I do?
> I am a django beginner。
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> 
> To unsubscribe from this group and stop receiving emails from it,
> send an email to django-users+unsubscr...@googlegroups.com.
> 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/60392967-fe9b-4733-a0e6-420e07f4dfc6%40googlegroups.com
> .
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f533ec42b78a9933df6c819e636d63b0817eb3eb.camel%40gammascience.co.uk.

Reply via email to