Hello everyone, Firstly, I've been using Django for quiet sometime now and have created a few projects and many of my websites run it. I am wanting to take my Django management to the next level, and need to use the os.fork() function, here's why.
I am planning on developing a web control panel for managing Django instances in Django itself. It only makes sense to make the control panel in Django. It will contain models for managing the actually instances themselves and which users have control to them, and what permissions these users have. Features I plan on putting into the control panel will be native Subversion support, using the Python Subversion libraries. This will allow projects to be versioned and updated using Subversion rather than FTP/SFTP. I currently use Subversion in this manner already and it works wonderfully. Other features will include stopping and starting instances by use of runfcgi management command. I plan on using FastCGI support for easier management and wider server support. I currently use Nginx for my website and it works nicely with Django's FastCGI server. It will allow database syncs and other tools normally supplied by manage.py. I also plan on adding support for creating new projects and associating it with an new Subversion repo. Now, the only hurdle I am currently trying to get past is the ability to manage a Django site from within a different Django site. I need to use Fork in order to make sure that the process uses the settings.py from the other Django instance, and for it stays separate from the Django control panel. For example, a user could add some malicious setting that could cause havoc when imported. Process separation is very important, and I would like some ideas on how I can go about doing this to ensure a secure server. Should I just spawn a new Python process perhaps with a specific function to do the management calls to be on the safe side? Here's the code I will be needing to run in a os.fork(): from django.core.management import setup_environ, call_command import settings setup_environ(settings) call_command('<management command>', **kwargs) So this would be in a separate function and called from a view which uses os.fork(), or should I place os.fork() in the same function as this code. Of course the sys.path will be re-written before any imports are done. I plan on integrating Virtualenv with this. The model in the management Django project will contain the directories and such that point to the Virtualenv. If anybody is interesting in helping with such a project, I am very much open to any help. I hope that this project may open Django to a wider world of users, if the command-line Django admin stuff can be done through a nifty web interface. I have a server which it can be developed and tested on as well. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.