From fcd8822c25a4097200722a65a3958ad074752e1f Mon Sep 17 00:00:00 2001
From: Roy Williams <roy@caltech.edu>
Date: Wed, 1 Oct 2014 08:16:46 -0700
Subject: [PATCH] sorted out the admin

---
 gracedb/management/commands/ingest_email.py |  5 ++++-
 settings/roy.py                             | 10 +++++++---
 urls.py                                     |  6 +++---
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/gracedb/management/commands/ingest_email.py b/gracedb/management/commands/ingest_email.py
index 4a408dfd2..9c103915b 100644
--- a/gracedb/management/commands/ingest_email.py
+++ b/gracedb/management/commands/ingest_email.py
@@ -19,7 +19,10 @@ class Command(BaseCommand):
         # create a log entry
         eel = EMBBEventLog(event=event)
         eel.event = event
-        eel.submitter = User.objects.get(username='roy.williams@LIGO.org')
+        try:
+            eel.submitter = User.objects.get(username='roy.williams@LIGO.org')
+        except Exception, e:
+            print str(e)
 
         # Assign a facility name
         try:
diff --git a/settings/roy.py b/settings/roy.py
index 8318e6ff8..7252fccd7 100644
--- a/settings/roy.py
+++ b/settings/roy.py
@@ -15,12 +15,15 @@ DATABASES = {
         'ENGINE'   : 'django.db.backends.mysql',
         'USER'     : 'jkanner',
         'PASSWORD' : 'batman',
+	'OPTIONS'  : {
+		'init_command' : 'SET storage_engine=MyISAM',
+		}
     }
 }
 
 ROOT_URLCONF = 'urls'
 
-MEDIA_URL = "/gracedb-static/"
+#MEDIA_URL = "/gracedb-static/"
 
 SKYMAP_VIEWER_MEDIA_URL = "/skymap-viewer/"
 
@@ -91,7 +94,7 @@ MIDDLEWARE_CLASSES = [
 #    'ligodjangoauth.LigoShibbolethMiddleware',
     'ligoauth.middleware.auth.LigoAuthMiddleware',
     'maintenancemode.middleware.MaintenanceModeMiddleware',
-    'debug_toolbar.middleware.DebugToolbarMiddleware',
+#    'debug_toolbar.middleware.DebugToolbarMiddleware',
 ]
 
 AUTHENTICATION_BACKENDS = (
@@ -130,7 +133,7 @@ INSTALLED_APPS = (
     'ligoauth',
     'rest_framework',
     'south',
-    'debug_toolbar',
+#    'debug_toolbar',
 )
 
 INTERNAL_IPS = (
@@ -138,6 +141,7 @@ INTERNAL_IPS = (
 )
 
 
+LOGGING = {}
 x = """     HACH HACK HACK
 LOG_ROOT = '/home/jkanner/logs'
 LOG_FILE_SIZE = 1024*1024 # 1 MB
diff --git a/urls.py b/urls.py
index 4cedf1c7d..6faabd5b4 100644
--- a/urls.py
+++ b/urls.py
@@ -5,8 +5,8 @@ from django.conf.urls import patterns, url, include
 from django.conf import settings
 
 # Uncomment the next two lines to enable the admin:
-#from django.contrib import admin
-#admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
 
 from gracedb.feeds import EventFeed, feedview
 
@@ -43,7 +43,7 @@ urlpatterns = patterns('',
     # to INSTALLED_APPS to enable admin documentation:
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
-#    url(r'^admin/', include(admin.site.urls)),
+    url(r'^admin/', include(admin.site.urls)),
 
     # For development only.  And only for old Django versions (like 1.2)
     (r'^gracedb-static/(?P<path>.*)$', 'django.views.static.serve',
-- 
GitLab