Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update django.VERSION in 1.0.x branch per previous discussion

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5e272e0f1a3770f2a94210584fa5c30ba6f640b4 1 parent b17453b
James Bennett authored September 30, 2008

Showing 1 changed file with 15 additions and 7 deletions. Show diff stats Hide diff stats

  1. 22  django/__init__.py
22  django/__init__.py
... ...
@@ -1,9 +1,17 @@
1  
-VERSION = (1, 0, 'post-release-SVN')
  1
+VERSION = (1, 0, 1, 'alpha', 0)
2 2
 
3 3
 def get_version():
4  
-    "Returns the version as a human-format string."
5  
-    v = '.'.join([str(i) for i in VERSION[:-1]])
6  
-    if VERSION[-1]:
7  
-        from django.utils.version import get_svn_revision
8  
-        v = '%s-%s-%s' % (v, VERSION[-1], get_svn_revision())
9  
-    return v
  4
+    version = '%s.%s' % (VERSION[0], VERSION[1])
  5
+    if VERSION[2]:
  6
+        version = '%s.%s' % (version, VERSION[2])
  7
+    if VERSION[3:] == ('alpha', 0):
  8
+        version = '%s pre-alpha' % version
  9
+    else:
  10
+        version = '%s %s' % (version, VERSION[3])
  11
+        if VERSION[3] != 'final':
  12
+            version = '%s %s' % (version, VERSION[4])
  13
+    from django.utils.version import get_svn_revision
  14
+    svn_rev = get_svn_revision()
  15
+    if svn_rev != u'SVN-unknown':
  16
+        version = "%s %s" % (version, svn_rev)
  17
+    return version

0 notes on commit 5e272e0

Please sign in to comment.
Something went wrong with that request. Please try again.