如何检查Django版本 [英] How to check Django version

查看:99
本文介绍了如何检查Django版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用 Python Django 。所以我有两个版本的Python,2.6和2.7。现在我已经安装了Django。我可以运行示例应用程序来测试Django。但是如何确定Django是否使用2.6或2.7版本以及Django使用的模块版本?

I have to use Python and Django for our application. So I have two versions of Python, 2.6 and 2.7. Now I have installed Django. I could run the sample application for testing Django succesfuly. But how do I make sure whether Django uses the 2.6 or 2.7 version and what version of modules Django uses?

推荐答案

Django 1.5支持Python 2.6.5和更高版本。

Django 1.5 supports Python 2.6.5 and later.

如果您在Linux下,要检查您使用的Python版本,请运行 python -V

If you're under Linux and want to check the Python version you're using, run python -V from the command line.

如果您想检查Django版本,请打开一个Python控制台并键入

If you want to check the Django version, open a Python console and type

import django
django.VERSION

这篇关于如何检查Django版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆