I added following command to Sessions -> Startup program but it didn't work. I'm using Ubuntu.
sudo -u www-data python manage.py 192.168.1.2:8001
192.168.1.2 is the ip address on ath0. Is it still not available for binding at the stage when this command is executed?
What I currently do is add another cronjob to restart the development server if it's not running every 5 minutes? Is it a better way to run it at startup?
Hopefully you're not trying to run the server in a production environment (according to the django docs). Take a look instead at apache with mod_wsgi.
If you are just running for local development, there is no need to run as the www-data user. You might want to look into the @reboot directive for cron, and just run the server as your user.
See this answer for details on runserver.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With