Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rosetta/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"""
WSGI_AUTO_RELOAD = getattr(settings, 'ROSETTA_WSGI_AUTO_RELOAD', False)
UWSGI_AUTO_RELOAD = getattr(settings, 'ROSETTA_UWSGI_AUTO_RELOAD', False)
ROSETTA_EXTERNAL_COMMANDS = getattr(settings, 'ROSETTA_EXTERNAL_COMMANDS', False)


# Exclude applications defined in this list from being translated
Expand Down
8 changes: 8 additions & 0 deletions rosetta/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ def _request_request(key, default=None):
except:
# we may not be running under uwsgi :P
pass

if rosetta_settings.ROSETTA_EXTERNAL_COMMANDS:
try:
from subprocess import call
for command in rosetta_settings.ROSETTA_EXTERNAL_COMMANDS:
call(command)
except:
pass

except Exception as e:
messages.error(request, e)
Expand Down