django · python

Finding Django version number

Simple to find, yet its needed sometimes. Posting just for reference: Open python and do type the following:

import django
django.VERSION
Advertisements

14 thoughts on “Finding Django version number

  1. Thanks, this is something so simple (and could have taken a while), I’m glad you said it nice and concisely!

  2. You’d be better off using:

    import django
    django.get_version()

    This parses the version number properly and if you’re using a SVN checkout, will display the commit id as well.

  3. yes
    django.get_version()

    is a lot friendlier

    >>> import django
    >>> django.VERSION
    (1, 2, 3, ‘final’, 0)
    >>> django.get_version()
    ‘1.2.3’
    >>>

  4. first type in “python” in cmd! then “import django”, and then “django.VERSION” :))) I had some problems untill I figure it out you must type in “python” …Sry I’m a newbie!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s