2 # (major, minor, bugfix, "pre-alpha" | "alpha" | "beta" | "final", release | 0)
3 VERSION = (0, 2, 0, 'alpha', 0)
7 version = '%s.%s' % (VERSION[0], VERSION[1])
9 version = '%s.%s' % (version, VERSION[2])
10 if VERSION[3:] == ('alpha', 0):
11 version = '%s pre-alpha' % version
13 if VERSION[3] != 'final':
14 version = '%s %s %s' % (version, VERSION[3], VERSION[4])
18 # We want to make get_version() available to setup.py even if Django is not
19 # available or we are not inside a Django project.
24 warnings.warn('django-tables requires Django, however it is not installed.'
25 ' Version information will still be available.')
28 # http://docs.djangoproject.com/en/dev/topics/settings/ says::
30 # If you don't set DJANGO_SETTINGS_MODULE and don't call configure(),
31 # Django will raise an ImportError exception the first time a setting is
34 from django.conf import settings
35 settings.DEBUG # will raise ImportError if Django isn't configured
37 # allow get_version() to remain available
39 warnings.warn('django-tables requires Django to be configured... but '
40 "it isn't! A bunch of stuff won't work :(")