django migration

I am one of the coaches on the Spain Park high school mountain bike team where both my son and daughter have been racing for many years now (since middle school). I run the team website, which I ported from standalone HTML to a django application to add the ability for team members to login, set goals, and sign up for weekly fitness classes where there is limited capacity.

Screenshot of the website up and running on its new home after passing all tests.

I expected this to run fairly smoothly, especially since it is just using a sqlite database which is a single file that has to be copied to the new location (rather than exporting and re-importing). One tricky problem I was worried about is that old server was running python2 and python3 and due to my inexperience working with python when setting everything up, a lot of paths and executables are sitting in the same directory and correspond to different versions of python.

Wow. django. python. Seems overly complicated to configure, but I did get it working after a couple hours. I could not just port over the site-packages from the old server even though it was also using python3.8. I still feel like this was a path problem, but I did eventually get it working by reinstalling all the packages that it said were “missing” to my developer account and then adding that path to the apache2 wsgi configuration for the website following these instructions:

WSGIDaemonProcess spainpark python-path=/var/www:/home/DEVELOPERACCOUNT/.local/lib/python3.8/site-packages processes=5
WSGIProcessGroup spainpark
WSGIScriptAlias / /var/www/spainpark/

Leave a comment

Your email address will not be published. Required fields are marked *