Created
April 12, 2012 18:36
-
-
Save harrislapiroff/2369929 to your computer and use it in GitHub Desktop.
OnCampus Development Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# this little trick lets us use relative paths | |
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x) | |
DEBUG = True | |
TEMPLATE_DEBUG = DEBUG | |
ADMINS = ( | |
# ('Your Name', 'your_email@example.com'), | |
) | |
MANAGERS = ADMINS | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': here('database'), # Or path to database file if using sqlite3. | |
} | |
} | |
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | |
# Local time zone for this installation. Choices can be found here: | |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | |
# although not all choices may be available on all operating systems. | |
# On Unix systems, a value of None will cause Django to use the same | |
# timezone as the operating system. | |
# If running in a Windows environment this must be set to the same as your | |
# system time zone. | |
TIME_ZONE = 'America/New_York' | |
# Language code for this installation. All choices can be found here: | |
# http://www.i18nguy.com/unicode/language-identifiers.html | |
LANGUAGE_CODE = 'en-us' | |
SITE_ID = 1 | |
# If you set this to False, Django will make some optimizations so as not | |
# to load the internationalization machinery. | |
USE_I18N = True | |
# If you set this to False, Django will not format dates, numbers and | |
# calendars according to the current locale | |
USE_L10N = True | |
MEDIA_ROOT = here('media') | |
MEDIA_URL = '/media/' | |
STATIC_ROOT = here('static') | |
STATIC_URL = '/static/' | |
ADMIN_MEDIA_PREFIX = STATIC_URL + 'grappelli/' | |
# List of finder classes that know how to find static files in | |
# various locations. | |
STATICFILES_FINDERS = ( | |
'django.contrib.staticfiles.finders.FileSystemFinder', | |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', | |
) | |
# Make this unique, and don't share it with anybody. | |
SECRET_KEY = 'v@n75)yxq158$v4ch@3u9mkrw%8q@@%_@k4v7=5=4b&fezht_p' | |
# List of callables that know how to import templates from various sources. | |
TEMPLATE_LOADERS = ( | |
'django.template.loaders.filesystem.Loader', | |
'django.template.loaders.app_directories.Loader', | |
# 'django.template.loaders.eggs.Loader', | |
) | |
MIDDLEWARE_CLASSES = ( | |
'django.middleware.common.CommonMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', | |
'django.contrib.messages.middleware.MessageMiddleware', | |
'philo.middleware.RequestNodeMiddleware' | |
) | |
TEMPLATE_CONTEXT_PROCESSORS = ( | |
"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.contrib.messages.context_processors.messages", | |
"django.core.context_processors.request" | |
) | |
ROOT_URLCONF = 'OnCampus.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. | |
) | |
INSTALLED_APPS = ( | |
'philo', | |
'grappelli', | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.sites', | |
'django.contrib.messages', | |
'django.contrib.comments', | |
'django.contrib.markup', | |
'django.contrib.humanize', | |
'django.contrib.staticfiles', | |
'philo.contrib.penfield', | |
'philo.contrib.shipherd', | |
'philo.contrib.sobol', | |
'pipetter', | |
'reversion', | |
'mptt', | |
'south', | |
'taggit', | |
'taggittokenfield', | |
'oberlin', | |
'oberlin.oncampus', | |
'oberlin.universal.classifieds', | |
'oberlin.oberlin_edu', | |
'oberlin.universal', | |
'oberlin.assets', | |
'oberlin.assets.images', | |
'oberlin.assets.external', | |
'oberlin.sites.webteam_blog', | |
) | |
# 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. | |
# See http://docs.djangoproject.com/en/dev/topics/logging for | |
# more details on how to customize your logging configuration. | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'mail_admins': { | |
'level': 'ERROR', | |
'class': 'django.utils.log.AdminEmailHandler' | |
} | |
}, | |
'loggers': { | |
'django.request': { | |
'handlers': ['mail_admins'], | |
'level': 'ERROR', | |
'propagate': True, | |
}, | |
} | |
} | |
PHILO_PERSON_MODULE = 'oberlin.Person' | |
GRAPPELLI_ADMIN_HEADLINE = 'OnCampus' | |
GRAPPELLI_ADMIN_TITLE = 'OnCampus' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pipetter | |
from django.conf import settings | |
from django.conf.urls.static import static | |
from django.conf.urls.defaults import * | |
from django.contrib import admin | |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
admin.autodiscover() | |
pipetter.autodiscover() | |
urlpatterns = staticfiles_urlpatterns() + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + patterns('', | |
url(r'^grappelli/', include('grappelli.urls')), | |
url(r'^admin/', include(admin.site.urls)), | |
url(r'^pipettes/(?P<pipette_name>[\w-]*)/(?P<argstr>[\w\/-]*)', 'pipetter.views.json_response'), | |
url(r'^images/', include('oberlin.assets.urls')), | |
url(r'^comments/', include('django.contrib.comments.urls')), | |
url(r'^tags/', include('taggittokenfield.urls')), | |
url(r'', include('philo.urls')), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment