PageRenderTime 149ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/django/__init__.py

https://code.google.com/p/mango-py/
Python | 16 lines | 15 code | 1 blank | 0 comment | 5 complexity | 63c9fce310fe91d9144a55df4c11ee96 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. VERSION = (1, 3, 1, 'ccg1', 3)
  2. def get_version():
  3. version = '%s.%s' % (VERSION[0], VERSION[1])
  4. if VERSION[2]:
  5. version = '%s.%s' % (version, VERSION[2])
  6. if VERSION[3:] == ('alpha', 0):
  7. version = '%s pre-alpha' % version
  8. else:
  9. if VERSION[3] != 'final':
  10. version = '%s %s %s' % (version, VERSION[3], VERSION[4])
  11. from django.utils.version import get_svn_revision
  12. svn_rev = get_svn_revision()
  13. if svn_rev != u'SVN-unknown':
  14. version = "%s %s" % (version, svn_rev)
  15. return version