django-rosetta
django-rosetta copied to clipboard
WSGI reload button
It would be nice if there could reload the wsgi and uwsgi processes manually, auto_reloading is not a good choice on production and it is not even neccesary to apply new translation for every page that is saved...
It could be written quite easily as I can see from glancing at the code - the code that reloads wsgi is this:
if rosetta_settings.WSGI_AUTO_RELOAD and \
'mod_wsgi.process_group' in request.environ and \
request.environ.get('mod_wsgi.process_group', None) and \
'SCRIPT_FILENAME' in request.environ and \
int(request.environ.get('mod_wsgi.script_reloading', '0')):
try:
os.utime(request.environ.get('SCRIPT_FILENAME'), None)
except OSError:
pass
# Try auto-reloading via uwsgi daemon reload mechanism
if rosetta_settings.UWSGI_AUTO_RELOAD:
try:
import uwsgi
# pretty easy right?
uwsgi.reload()
except:
# we may not be running under uwsgi :P
pass
The reason why I did not fork implemented is that I have no idea where to put the reload button and what should I call it - maybe something like "Apply changes"
I second this. I didn´t quite love the idea of restarting the webserver every time one person hits "save".
+1
+1