Hi guys, I have a quick question. I am running Django in my dev env with WSGI and Apache, i have to restard apache everytime I modify the python code to take changes effect. This is quite annoying. Just out of curiosity, would that be resolved when I swap over to gunicorn ?
@sopanshewale thanks, Well, no. My setup is a bit custom though. I am running my dev env in a custom vagrant box and connect to it via Pycharms vagrant feature. All I want is to get rid of a second terminal where I run commands on the vagrant box. But maybe you are correct that the easiest is to just use the manage.py and bind it to the VMs IP, but then again, I'd need to leave it running while I develop.
@tulpn - i am still not sure if i understand your custom environment. I do code frequently using Vagrant box. My VM is always running. I connect via "vagrant ssh" & "vi" is still my IDE. I am happy with manage.py. I can think of using gunicorn or uwsgi, ngnix or apache only in production environment. BTW - these days Docker containers are best friends :)
@sopanshewale I run a Windows environment in which I develop but I want to be as close as possible with the setup to the production env, that I don't run into unexpected issues for whatever reason. To keep it simple, and also for new developers in the team, I created a custom vagrant template in which I set everything up for our django & api development. All that a developer then has to do is to install the box, git clone any of the projects and run their personal editor. I personally use Pycharm, in which i can directly connect the virtualenv via vagrant and it figures all out for the IDE project support.
The django app is then disclosed via the vagrant ip and thats it. Happy coding ^.^ In theory. But because it is setup as an apache wsgi it is annoying to run the restart command to reflect the changes. Tbh, I am just experimenting with this setup so far - and the current setup is definately not convenient.
@tulpn - That's great! Thank you! Why don't you replace only one part! Instead of uwsgi - use manage.py (off-course you need to check port vs socket stuff)! I think everything should work properly in your environment
@koderNeptune - are you looking for cloning the sites? If you are looking for only scrapped data and want to push that into DB's or want to create csv or other formats then JSON is best. I am not understanding your use-case
@sopanshewale thanks! I ended up doing it via manage.py and reverse proxy it via nginx - works fine. The gunicorn solution didnt solve my initial problem, but at least all 3 methods are working and are configured so a developer can choose their preferred method
Hello! If I have 3 models with FK relations A->B->C, is there a way to define a form where I can have formsets for B, that include formsets of A? Something like nested formsets, or inheritance formsets..? I have a multilevel hierarchy model’s that I would like to present in a form… and I have no clue where to begin