-
-
Save gregnewman/220962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple way to see which version of django apps you have | |
# Author: Alexander Artemenko | |
import pkg_resources | |
from django.conf import settings | |
def get_version(app): | |
try: | |
d = pkg_resources.get_distribution(app) | |
return d.project_name, d.version | |
except: | |
return app, 'unknown' | |
for app in settings.INSTALLED_APPS: | |
print get_version(app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment