Skip to content
Snippets Groups Projects
Commit 5910d1f1 authored by Brian Moe's avatar Brian Moe
Browse files
parents 0b995598 e9ef2fbc
No related branches found
No related tags found
No related merge requests found
from django.http import HttpResponse
class CliExceptionMiddleware(object):
def process_exception(self, request, exception):
if 'cli_version' in request.POST:
response = HttpResponse(mimetype='application/json')
# XXX JSON
msg = str({ 'error': "Server exception: %s" % str(exception) })
response.write(msg)
response['Content-length'] = len(msg)
return response
else:
return None
......@@ -91,6 +91,7 @@ AUTHENTICATION_BACKENDS = ('gracedb.middleware.auth.LigoAuthBackend',)
MIDDLEWARE_CLASSES = (
'gracedb.middleware.accept.AcceptMiddleware',
'gracedb.middleware.auth.LigoAuthMiddleware',
'gracedb.middleware.cli.CliExceptionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
......
......@@ -83,6 +83,7 @@ AUTHENTICATION_BACKENDS = ('gracedb.middleware.auth.LigoAuthBackend',)
MIDDLEWARE_CLASSES = (
'gracedb.middleware.accept.AcceptMiddleware',
'gracedb.middleware.auth.LigoAuthMiddleware',
'gracedb.middleware.cli.CliExceptionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
......
......@@ -19,7 +19,7 @@
text-decoration:none;
font:bold 1em/1em Arial, Helvetica, sans-serif;
text-transform:uppercase;
text-shadow: 2px 2px 2px #555;
/* text-shadow: 2px 2px 2px #555; */
}
#nav li {
......@@ -46,7 +46,7 @@
text-decoration:none;
font:bold 1em/1em Arial, Helvetica, sans-serif;
text-transform:uppercase;
text-shadow: 2px 2px 2px #555;
/* text-shadow: 2px 2px 2px #555; */
}
#nav a:hover {
/* color:#fff; / * Use if bg is dark */
......@@ -64,7 +64,7 @@
#contact #nav-contact a {
background: #a9b0ba; /* Nav selected color */
/* color:#fff; / * Use if bg is dark */
text-shadow:none;
/* text-shadow:none; */
}
#home #nav-home a:hover,
#create #nav-create a,
......
......@@ -80,7 +80,7 @@ a.link, a, a.active {
text-decoration:none;
font:bold 1em/1em Arial, Helvetica, sans-serif;
text-transform:uppercase;
text-shadow: 2px 2px 2px #555;
/* text-shadow: 2px 2px 2px #555; */
}
#nav li {
......@@ -107,7 +107,7 @@ a.link, a, a.active {
text-decoration:none;
font:bold 1em/1em Arial, Helvetica, sans-serif;
text-transform:uppercase;
text-shadow: 2px 2px 2px #555;
/* text-shadow: 2px 2px 2px #555; */
}
#nav a:hover {
/* color:#fff; / * Use if bg is dark */
......@@ -125,7 +125,7 @@ a.link, a, a.active {
#contact #nav-contact a {
background: #a9b0ba; /* Nav selected color */
/* color:#fff; / * Use if bg is dark */
text-shadow:none;
/* text-shadow:none; */
}
#home #nav-home a:hover,
#create #nav-create a,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment