开发者

How to know what django version i use? is it 1.0, 1.1, or 1.2?

开发者 https://www.devze.com 2023-01-24 17:59 出处:网络
this is the first time i use dja开发者_高级运维ngo. I\'m really a beginner. And this is the first time i see the page \"It worked! Congratulations on your first Django-powered page.\". it\'s mean i\'m

this is the first time i use dja开发者_高级运维ngo. I'm really a beginner. And this is the first time i see the page "It worked! Congratulations on your first Django-powered page.". it's mean i'm now have a django+python in my xampp server. So i cam to the question ?

  1. How to know what django version i use? is it 1.0, 1.1, or 1.2 ?
  2. where i can read it in my django folder (a file name) and how i can use code/function to print the django version ?
  3. is there any subtitute for phpinfo() in python ?


As to your first question:


jcomeau@intrepid:/usr/src/unternet$ python
Python 2.6.6 (r266:84292, Oct  9 2010, 11:40:09) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.2.3'


import django
django.VERSION


For the third question, you can get the list of available modules from the interpreter prompt:

>>> help()

help> modules

This will (eventually) give you a list of available modules.

For other info, you can use the sys module:

import sys

sys.version # Python version
sys.platform # platform


For your third question, Python Equivalent to phpinfo()


python manage.py runserver

Output:

Validating models...

0 errors found February 27, 2015 - 14:25:41 Django version 1.6.5, using settings ... ....

0

精彩评论

暂无评论...
验证码 换一张
取 消