justjoe
justjoe

Reputation: 5564

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

this is the first time i use django. 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 ?

Upvotes: 17

Views: 27937

Answers (5)

Octo
Octo

Reputation: 241

python manage.py runserver

Output:

Validating models...

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

Upvotes: 2

Ankit Jaiswal
Ankit Jaiswal

Reputation: 23427

For your third question, Python Equivalent to phpinfo()

Upvotes: 2

aaronasterling
aaronasterling

Reputation: 70984

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

Upvotes: 2

jcomeau_ictx
jcomeau_ictx

Reputation: 38412

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'

Upvotes: 37

soulseekah
soulseekah

Reputation: 9162

import django
django.VERSION

Upvotes: 9

Related Questions