To make it easier to understand, i will use simple command line as 'ls'
How can i use a command line like 'pwd' or 'ls' into a django server ?
For example, my django server is running 'python manage.py runserver'
And into my code i would like to run a cmd command like 'pwd' and get the output of this command :
@login_required
def history(request):
list_file = print('ls') #i would like to do 'ls' command
return render(request, 'history.html')
Is it possible ?
Thank for your help !