Reputation: 3167
I can't believe this hasn't been asking on here before. Besides using a syntax error to make the debug screen appear in the browser, is there another way to check which version of Python a Django site is running?
Upvotes: 3
Views: 1062
Reputation: 55448
Not that different from checking Python version from any Python program, https://docs.python.org/2/library/platform.html#platform.python_version
>>> from platform import python_version
>>> python_version() # Read this value from e.g. a Django command, or a page
'2.7.6'
# Or
>>> import sys
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)
Upvotes: 2