diff options
| author | David Cramer | 2011-05-10 00:06:54 -0700 |
|---|---|---|
| committer | David Cramer | 2011-05-10 00:06:54 -0700 |
| commit | 3f98e826400f29da672e96c1b08dc4bf7287b5c2 (patch) | |
| tree | b890ea2fcf7fd53983c9f890e5b8a12f87152fa7 /debug_toolbar/__init__.py | |
| parent | 33a22a2e1200332b7e18a4ab4af6ef00e28d71dc (diff) | |
| download | django-debug-toolbar-3f98e826400f29da672e96c1b08dc4bf7287b5c2.tar.bz2 | |
Bump version and use get-distribution to avoid unnescesary imports
Diffstat (limited to 'debug_toolbar/__init__.py')
| -rw-r--r-- | debug_toolbar/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/debug_toolbar/__init__.py b/debug_toolbar/__init__.py index 90f9e2f..48da4a6 100644 --- a/debug_toolbar/__init__.py +++ b/debug_toolbar/__init__.py @@ -1,2 +1,7 @@ -VERSION = (0, 8, 5) -__version__ = '.'.join(map(str, VERSION)) +__all__ = ('VERSION',) + +try: + VERSION = __import__('pkg_resources') \ + .get_distribution('django-debug-toolbar').version +except Exception, e: + VERSION = 'unknown' |
