2011年3月25日 星期五

[Django] Detect Django Version - 取得Django版本

$ pip freeze | grep 'Django'

Django==1.5.1

Or

$ python

Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(1, 3, 0, 'final', 0)

Or

python -c "import django; print(django.get_version())"
Related Posts Plugin for WordPress, Blogger...