I need to call a fabric method on a remote machine through django. I mean when user send a given request get the hostname of a remote machine.
Something like this:
def get_hostname(request):
hostname = os.system('fab remote_server hostname')
return hostname
For greater control and flexibility you should use fabric as a library. see: http://docs.fabfile.org/en/1.3.3/usage/library.html