Created
August 21, 2015 11:54
-
-
Save walterrenner/235f6bd1762486a36ab5 to your computer and use it in GitHub Desktop.
print django project information
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
from compat import import_string | |
from django.conf import settings | |
for app_name in settings.INSTALLED_APPS: | |
app = __import__(app_name) | |
print "Information for " + app_name | |
try: | |
print "verion: " + app.__version__ | |
except Exception as e: | |
print "version: " + str(e) | |
print "path: " + app.__file__.rstrip('/__init__.pyc') | |
print "" | |
print "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment