Ten one liner załatwia sprawę:

python -c 'import django; print ".".join([str(s) for s in django.VERSION]);'