Deploying To Shared Hosting

Developing a couple Django apps. On my development system, the urls.py paths start at the root of the website and everything plays nice. On the hosting system, unless I add /subdir/path the URL fails.

I am sure others have encountered this. How do I deploy changes to the hosting system without manually editing urls.py and URL paths in jquery every time I deploy a change? A search and replace during deployment from GitHub? wsgi modifications?

Any insight is appreciated

Welcome @ramchip50 !

In my case, there’s a little bit of “cargo cult coding” happening here.

I use the FORCE_SCRIPT_NAME in the Django settings along with the mount and manage-script-name = true settings in my uwsgi.int file.

(I need both, because I generate a lot of HTML that is not associated with a request, and that HTML needs to generate urls for other resources.)