From 7db738d4698789a40a14e6725f613cdbb37daade Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Sat, 6 Jul 2013 12:21:02 +0200 Subject: [PATCH] friendlier way of handling django_extensions --- example2/example2/settings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/example2/example2/settings.py b/example2/example2/settings.py index aff938c..bda779b 100644 --- a/example2/example2/settings.py +++ b/example2/example2/settings.py @@ -122,9 +122,16 @@ INSTALLED_APPS = ( 'rest_framework', 'djadmin2', 'polls', - 'django_extensions', ) +try: + import django_extensions + INSTALLED_APPS += ( + 'django_extensions', + ) +except ImportError: + pass + # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False.