#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hc.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

@@ -15,16 +15,31 @@
  python%0A
+import logging%0A
 import o
@@ -40,16 +40,16 @@
 port os%0A
-
 import s
@@ -221,40 +221,248 @@
     
-execute_from_command_line(sys.argv)
+logger = logging.getLogger(%22django%22)%0A    try:%0A        execute_from_command_line(sys.argv)%0A    except Exception as e:%0A        msg = %22Admin Command Error: %25s%22%0A        logger.error(msg, %22 %22.join(sys.argv), exc_info=sys.exc_info())%0A        raise e
 %0A

Enable error emails from management commands