Tested on:RPi3B; RaspiOS Buster
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)

Raspberry Pi with Django and Nginx as server

The Django test server can be easily replaced by a faster alternative like Nginx (with uwsgi), though the features of an advanced server like Nginx might not be necessary for e.g. a Raspberry Pi GUI with Django. In fact, for some reason the testserver setup works better, when Python Threads are involved. If anyone has an idea how to overcome that with Nginx, please share in the comments.

Auto login and IP
Assign your RPi the static ethernet IP Now, enter

Go to Boot Options, then Desktop/CLI and choose Console Autologin. Confirm and reboot.

Install apt packages

Virtual environment and Django project

Nginx Configuration

Run Nginx and uwsgi

The Django test project is now available under the address
in the local ethernet network.

For starting the Django project automatically after booting, use the command above with a
systemd script.

RPi autostart: http://www.knight-of-pi.orgwww.knight-of-pi.org/options-for-autostarting-raspberry-pi-programs-init-d-bashrc-and-cron/
RPi ethernet setup: http://www.knight-of-pi.orgwww.knight-of-pi.org/ethernet/
Nginx: http://nginx.org/
uwsgi: https://uwsgi-docs.readthedocs.io/en/latest/

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.