PageRenderTime 263ms CodeModel.GetById 122ms app.highlight 3ms RepoModel.GetById 137ms app.codeStats 0ms

/django/__init__.py

https://code.google.com/p/mango-py/
Python | 16 lines | 15 code | 1 blank | 0 comment | 4 complexity | 63c9fce310fe91d9144a55df4c11ee96 MD5 | raw file
 1VERSION = (1, 3, 1, 'ccg1', 3)
 2
 3def get_version():
 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        if VERSION[3] != 'final':
11            version = '%s %s %s' % (version, VERSION[3], VERSION[4])
12    from django.utils.version import get_svn_revision
13    svn_rev = get_svn_revision()
14    if svn_rev != u'SVN-unknown':
15        version = "%s %s" % (version, svn_rev)
16    return version