Python Forum
Django, Background Scripts, Raspberry Pi and GPIO - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Django, Background Scripts, Raspberry Pi and GPIO (/thread-216.html)



Django, Background Scripts, Raspberry Pi and GPIO - Dean Stackhouse - Sep-30-2016

Hey,

I'm quite new to python and Django so i'm uncertain if Django will be a good fit to what i need.

I wish to develop a web interface to display sensor information, control outputs and run background tasks.

I have considered running a python cronjob that links to a SQL database then have Django link to the same database.

I could input settings into the database via Django that the background script would then read.

I could maybe use AJAX to perform page updates.

Mainly looking for opinions or better options before i get started as i'm not too keen on heading down the wrong path if a better one is available.

Thanks.


RE: Django, Background Scripts, Raspberry Pi and GPIO - micseydel - Sep-30-2016

That all sounds well and good, but if your webapp is going to be pretty simple, I'd advocate for Flask over Django due to the learning curve. That is, unless you've been meaning to learn Django anyway, which I hear pretty often :)


RE: Django, Background Scripts, Raspberry Pi and GPIO - j.crater - Oct-01-2016

I agree with micseydel's advice. IMO learning Django is for many reasons a good choice, one you most likely will not regret if you plan to do a lot of work on web-database interfaces in future ;)


RE: Django, Background Scripts, Raspberry Pi and GPIO - wavic - Oct-01-2016

For such a simple task even bottle.py will fits.

Anyway, if I need some monitoring solution I'm going to look for something simple. May be around PyZMQ.