summaryrefslogtreecommitdiff
path: root/django/__init__.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-10 02:00:46 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-06-10 02:00:46 +0000
commit130c7eee8058847083ad58f1f9abdcf51e879032 (patch)
treeaa1d3a0ea82d72f147c5667fdbc18393ba8e0fe6 /django/__init__.py
parent6fc10f50b0c9b877fffcad4893056cb91fa66b4f (diff)
Fixed #4517 -- Made sure that URL_VALIDATOR_USER_AGENT includes the up-to-date
Django version number. Thanks, James Wheare. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/__init__.py')
-rw-r--r--django/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/__init__.py b/django/__init__.py
index 7a24af2b4e..17d8c519cc 100644
--- a/django/__init__.py
+++ b/django/__init__.py
@@ -1 +1,8 @@
VERSION = (0, 97, 'pre')
+
+def get_version():
+ "Returns the version as a human-format string."
+ v = '.'.join([str(i) for i in VERSION[:-1]])
+ if VERSION[-1]:
+ v += '-' + VERSION[-1]
+ return v