I am trying to get the django version that is installed, I have tried using php and python
if I use linux terminal
$ django-admin --version
3.2.13
using python:
cmd = “pip show django | grep Name” #command to be executed
subprocess.call(cmd, shell=True)
this returns Name: Django
if I grep version I get
Version: 1.11.11
I tried php and used
$retval = shell_exec( ‘django-admin --version’);
echo $retval
it returns 1.11.11