Skip to content

Instantly share code, notes, and snippets.

@svetlyak40wt
Created October 28, 2009 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save svetlyak40wt/220493 to your computer and use it in GitHub Desktop.
Save svetlyak40wt/220493 to your computer and use it in GitHub Desktop.
# 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