Skip to content
Snippets Groups Projects
Commit 06ba44aa authored by Tanner Prestegard's avatar Tanner Prestegard Committed by Alexander Pace
Browse files

modifying template settings and adding in debug info

parent ed68c7c9
No related branches found
No related tags found
No related merge requests found
......@@ -257,30 +257,64 @@ ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = DEFAULT_SECRET_KEY
# Upgrade template settings to 1.8
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
'/home/gracedb/gracedb/templates',
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Defaults
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
# Extra additions
'django.core.context_processors.request',
'gracedb.middleware.auth.LigoAuthContext',
'middleware.debug.LigoDebugContext',
'ligoauth.context_processors.shib_login_url',
],
},
},
]
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
#'django.template.loaders.filesystem.load_template_source',
# replaced by...
'django.template.loaders.filesystem.Loader',
# Upgrade to 1.4
#'django.template.loaders.app_directories.load_template_source',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.load_template_source',
)
#TEMPLATE_LOADERS = (
# #'django.template.loaders.filesystem.load_template_source',
# # replaced by...
# 'django.template.loaders.filesystem.Loader',
# # Upgrade to 1.4
# #'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.app_directories.Loader',
## 'django.template.loaders.eggs.load_template_source',
#)
#
#TEMPLATE_CONTEXT_PROCESSORS = (
# #"django.core.context_processors.auth",
# # replaced by...
# "django.contrib.auth.context_processors.auth",
# "django.core.context_processors.debug",
# "django.core.context_processors.i18n",
# "django.core.context_processors.media",
# "django.core.context_processors.static",
# "django.core.context_processors.request",
# "gracedb.middleware.auth.LigoAuthContext",
# 'middleware.debug.LigoDebugContext',
# 'ligoauth.context_processors.shib_login_url',
#)
#
## Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
## Always use forward slashes, even on Windows.
## Don't forget to use absolute paths, not relative paths.
#TEMPLATE_DIRS = (
# "/home/gracedb/gracedb/templates",
#)
TEMPLATE_CONTEXT_PROCESSORS = (
#"django.core.context_processors.auth",
# replaced by...
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
"gracedb.middleware.auth.LigoAuthContext",
'middleware.debug.LigoDebugContext',
'ligoauth.context_processors.shib_login_url',
)
AUTHENTICATION_BACKENDS = (
# 'gracedb.middleware.auth.LigoAuthBackend',
......@@ -322,13 +356,6 @@ MIDDLEWARE_CLASSES = [
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"/home/gracedb/gracedb/templates",
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
......
......@@ -32,24 +32,30 @@ function changeTime(obj, label) {
<div id="content">
<center>
<h1> GraceDB &mdash; Gravitational Wave Candidate Event Database</h1>
<h1>GraceDB &mdash; Gravitational Wave Candidate Event Database</h1>
</center>
{% block nav %}
{% include "navbar_frag.html" %}
{% endblock %}
<p>&nbsp;</p> <!-- bad way to create vertical space -->
<p>&nbsp;</p> <!-- bad way to create vertical space -->
{% load flash %}
{% flash %}
<div id="status_block" class="{{ params.class }}">{{ msg }}</div>
{% endflash %}
{% if user.is_staff %}
<!-- debug information for admins -->
<div id="debugDiv">
<!--<pre>{% filter force_escape %} {% debug %} {% endfilter %}</pre> -->
</div>
{% endif %}
<h2>{% block heading %}Title{% endblock %}</h2>
<h2>{% block heading %}Title{% endblock %}</h2>
<p>test</p>
{% block content %}{% endblock %}
</div>
......
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