2012-09-18 13:45:00 -07:00
# Django settings for snipt project.
2011-06-01 21:50:18 -07:00
2012-10-18 19:00:15 -07:00
import os
2011-10-23 17:54:44 -07:00
2013-01-13 20:17:18 -08:00
DEBUG = True
2011-10-23 19:44:37 -07:00
BASE_PATH = os . path . dirname ( __file__ )
2011-06-01 21:50:18 -07:00
ADMINS = (
2012-09-18 13:45:00 -07:00
( ' Name ' , ' name@domain.com ' ) ,
2011-06-01 21:50:18 -07:00
)
2012-10-18 19:00:15 -07:00
MANAGERS = ADMINS
2011-06-01 21:50:18 -07:00
2011-10-23 17:54:44 -07:00
DATABASES = {
' default ' : {
2012-02-14 18:09:39 -08:00
' ENGINE ' : ' django.db.backends.postgresql_psycopg2 ' ,
2014-09-25 14:18:18 -07:00
' NAME ' : os . environ . get ( ' DB_NAME ' , ' snipt ' ) ,
' USER ' : os . environ . get ( ' DB_USER ' , ' ' ) ,
' PASSWORD ' : os . environ . get ( ' DB_PASS ' , ' ' ) ,
2014-09-26 09:01:23 -07:00
' HOST ' : os . environ . get ( ' DB_PORT_5432_TCP_ADDR ' , ' 127.0.0.1 ' ) ,
2014-09-25 14:18:18 -07:00
' PORT ' : os . environ . get ( ' DB_PORT_5432_TCP_PORT ' , ' ' ) ,
2011-10-23 17:54:44 -07:00
}
}
2012-10-18 19:00:15 -07:00
INTERNAL_IPS = ( ' 127.0.0.1 ' , )
2011-10-23 17:54:44 -07:00
2011-06-01 21:50:18 -07:00
SITE_ID = 1
2011-10-23 17:54:44 -07:00
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
2011-06-01 21:50:18 -07:00
2011-10-23 17:54:44 -07:00
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
2012-10-18 19:00:15 -07:00
# Local time zone. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
#
# On Unix systems, a value of None will cause Django to use the same timezone as
# the operating system. On a Windows environment, this must be set to the same
# as your system time zone
TIME_ZONE = ' America/New_York '
2013-03-24 15:15:49 -07:00
USE_TZ = True
2012-10-18 19:00:15 -07:00
# Language code for the Django installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = ' en-us '
2011-10-23 17:54:44 -07:00
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
2011-12-25 13:00:41 -08:00
MEDIA_ROOT = os . path . join ( BASE_PATH , ' media/uploads ' )
2011-10-23 17:54:44 -07:00
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
2011-12-25 13:00:41 -08:00
MEDIA_URL = ' /media/uploads/ '
2011-10-23 17:54:44 -07:00
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
2011-10-23 19:44:37 -07:00
STATIC_ROOT = os . path . join ( BASE_PATH , ' static ' )
2012-10-18 19:00:15 -07:00
STATIC_URL = ' /static/ '
2011-10-23 17:54:44 -07:00
# Additional locations of static files
STATICFILES_DIRS = (
2011-10-23 19:44:37 -07:00
os . path . join ( BASE_PATH , ' media ' ) ,
2011-10-23 17:54:44 -07:00
)
2011-06-01 21:50:18 -07:00
2011-10-23 17:54:44 -07:00
# 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 ' ,
2011-06-01 21:50:18 -07:00
)
2011-10-23 17:54:44 -07:00
2013-04-14 20:35:05 -07:00
SECRET_KEY = ' changethis '
2011-10-23 17:54:44 -07:00
2012-10-18 19:00:15 -07:00
INSTALLED_APPS = (
' gunicorn ' ,
' django.contrib.auth ' ,
' django.contrib.contenttypes ' ,
' django.contrib.humanize ' ,
' django.contrib.sessions ' ,
' django.contrib.sites ' ,
' django.contrib.messages ' ,
' django.contrib.staticfiles ' ,
' django.contrib.admin ' ,
2013-03-25 18:45:52 -07:00
' django_bcrypt ' ,
2012-10-18 19:00:15 -07:00
' haystack ' ,
' markdown_deux ' ,
' pagination ' ,
' postmark ' ,
' registration ' ,
' south ' ,
' taggit ' ,
' tastypie ' ,
' typogrify ' ,
' accounts ' ,
' blogs ' ,
2013-09-05 10:28:35 -07:00
' jobs ' ,
2012-10-18 19:00:15 -07:00
' snipts ' ,
' utils ' ,
)
2011-10-23 17:54:44 -07:00
# List of callables that know how to import templates from various sources.
2011-06-01 21:50:18 -07:00
TEMPLATE_LOADERS = (
2011-10-23 17:54:44 -07:00
' django.template.loaders.filesystem.Loader ' ,
' django.template.loaders.app_directories.Loader ' ,
# 'django.template.loaders.eggs.Loader',
2011-06-01 21:50:18 -07:00
)
2011-10-23 19:44:37 -07:00
TEMPLATE_CONTEXT_PROCESSORS = (
2012-06-04 13:22:00 -07:00
' django.contrib.auth.context_processors.auth ' ,
2011-10-23 19:44:37 -07:00
' django.core.context_processors.debug ' ,
' django.core.context_processors.i18n ' ,
' django.core.context_processors.media ' ,
' django.core.context_processors.request ' ,
' django.core.context_processors.static ' ,
2013-01-13 09:51:25 -08:00
' django.contrib.messages.context_processors.messages ' ,
2011-10-23 19:44:37 -07:00
)
2011-10-23 17:54:44 -07:00
2011-06-01 21:50:18 -07:00
MIDDLEWARE_CLASSES = (
2012-06-04 13:22:00 -07:00
' django.middleware.csrf.CsrfViewMiddleware ' ,
2011-06-01 21:50:18 -07:00
' django.middleware.common.CommonMiddleware ' ,
2011-10-23 17:54:44 -07:00
' django.contrib.sessions.middleware.SessionMiddleware ' ,
2011-06-01 21:50:18 -07:00
' django.contrib.auth.middleware.AuthenticationMiddleware ' ,
2011-10-23 17:54:44 -07:00
' django.contrib.messages.middleware.MessageMiddleware ' ,
2011-10-12 08:29:21 -07:00
' pagination.middleware.PaginationMiddleware ' ,
2012-06-04 14:09:08 -07:00
' blogs.middleware.BlogMiddleware ' ,
2011-06-01 21:50:18 -07:00
)
2013-05-13 07:03:27 -07:00
AUTHENTICATION_BACKENDS = (
' utils.backends.EmailOrUsernameModelBackend ' ,
)
2013-11-06 11:10:04 -08:00
ROOT_URLCONF = ' urls '
2011-10-23 17:54:44 -07:00
PROJECT_PATH = os . path . abspath ( os . path . dirname ( __file__ ) )
2011-06-01 21:50:18 -07:00
2011-10-23 17:54:44 -07:00
TEMPLATE_DIRS = (
os . path . join ( PROJECT_PATH , ' templates ' )
)
2011-06-01 21:50:18 -07:00
2013-01-30 07:32:13 -08:00
SESSION_COOKIE_AGE = 15801100
2013-01-30 07:29:41 -08:00
2011-10-23 17:54:44 -07:00
# 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 ,
2013-03-24 19:38:04 -07:00
' filters ' : {
' require_debug_false ' : {
' () ' : ' django.utils.log.RequireDebugFalse '
}
} ,
2011-10-23 17:54:44 -07:00
' handlers ' : {
2013-04-28 20:39:55 -07:00
#'mail_admins': {
#'level': 'ERROR',
#'filters': ['require_debug_false'],
#'class': 'django.utils.log.AdminEmailHandler'
#}
2011-10-23 17:54:44 -07:00
} ,
' loggers ' : {
2013-04-28 20:39:55 -07:00
#'django.request': {
#'handlers': ['mail_admins'],
#'level': 'ERROR',
#'propagate': True,
#},
2011-10-23 17:54:44 -07:00
}
}
2011-06-01 21:50:18 -07:00
2012-10-18 19:00:15 -07:00
HAYSTACK_CONNECTIONS = {
' default ' : {
' ENGINE ' : ' haystack.backends.simple_backend.SimpleEngine ' ,
} ,
}
2013-01-20 10:42:18 -08:00
HAYSTACK_SIGNAL_PROCESSOR = ' haystack.signals.RealtimeSignalProcessor '
2011-10-23 17:54:44 -07:00
# Account settings
2013-04-28 17:11:11 -07:00
LOGIN_REDIRECT_URL = ' /login-redirect/ '
2011-10-23 17:54:44 -07:00
LOGIN_URL = ' /login/ '
LOGOUT_URL = ' /logout/ '
2012-02-12 21:42:25 -08:00
ACCOUNT_ACTIVATION_DAYS = 0
2011-10-23 17:54:44 -07:00
2012-05-15 17:10:50 -07:00
# Messages
MESSAGE_STORAGE = ' django.contrib.messages.storage.cookie.CookieStorage '
2011-10-02 15:38:20 -07:00
# User absolute URLs
ABSOLUTE_URL_OVERRIDES = {
' auth.user ' : lambda u : " / %s / " % u . username ,
}
2011-10-24 20:34:07 -07:00
2012-06-26 08:33:22 -07:00
# Accounts
AUTH_PROFILE_MODULE = ' accounts.UserProfile '
2012-09-14 06:47:16 -07:00
# API
TASTYPIE_CANNED_ERROR = " There was an error with your request. The site developers have a record of this error, please email api@snipt.net and we ' ll help you out. "
2012-09-18 13:45:00 -07:00
try :
2013-03-25 17:45:27 -07:00
from settings_local import *
2012-09-18 13:45:00 -07:00
except ImportError :
pass