3👍
✅
Actually, /var/www
is a bad place for your Django code. It’s the default DocumentRoot for Apache, so is the place were it looks to serve files to users; but Django code is not files that should be served, it’s code that should be run. Putting the code there allows the possibility that a misconfiguration permits your code to be served directly to users, which is a big security risk.
Apart from that, it doesn’t really matter where the code goes. Personally I like /srv
.
Source:stackexchange.com