2011-08-31 03:46:55 +00:00
|
|
|
from os.path import dirname, realpath, join
|
|
|
|
|
|
|
|
PROJECT_DIR = dirname(dirname(realpath(__file__)))
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
|
|
# Example: "/home/media/media.lawrence.com/media/"
|
|
|
|
MEDIA_ROOT = ''
|
|
|
|
|
|
|
|
# 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/"
|
|
|
|
MEDIA_URL = ''
|
|
|
|
|
|
|
|
# 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/"
|
|
|
|
STATIC_ROOT = ''
|
|
|
|
|
|
|
|
# URL prefix for static files.
|
|
|
|
# Example: "http://media.lawrence.com/static/"
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
# URL prefix for admin static files -- CSS, JavaScript and images.
|
|
|
|
# Make sure to use a trailing slash.
|
|
|
|
# Examples: "http://foo.com/static/admin/", "/static/admin/".
|
|
|
|
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
|
|
|
|
|
|
|
# Additional locations of static files
|
|
|
|
STATICFILES_DIRS = (
|
|
|
|
join(PROJECT_DIR, 'static'),
|
|
|
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
|
|
|
# Always use forward slashes, even on Windows.
|
|
|
|
# Don't forget to use absolute paths, not relative paths.
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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 = 'a+bo0@3$n18e(newe7og6hmq$r#bkib73z(+s*n25%6q3+22jo'
|
|
|
|
|
|
|
|
# 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',
|
|
|
|
)
|
|
|
|
|
2011-09-04 05:04:04 +00:00
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
2011-09-04 05:29:18 +00:00
|
|
|
'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',
|
2011-09-04 05:04:04 +00:00
|
|
|
'django.core.context_processors.request',
|
2012-01-15 19:56:26 +00:00
|
|
|
'regluit.context_processors.is_preview',
|
2011-09-04 05:04:04 +00:00
|
|
|
)
|
|
|
|
|
2011-08-31 03:46:55 +00:00
|
|
|
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',
|
|
|
|
)
|
|
|
|
|
|
|
|
ROOT_URLCONF = 'regluit.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.
|
2011-12-31 03:08:04 +00:00
|
|
|
join(PROJECT_DIR, "frontend", "templates"),
|
2011-09-04 04:21:51 +00:00
|
|
|
join(PROJECT_DIR, "frontend", "templates", "registration"),
|
2011-08-31 03:46:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.sites',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
2011-12-31 03:08:04 +00:00
|
|
|
'django.contrib.comments',
|
2011-08-31 03:46:55 +00:00
|
|
|
'south',
|
|
|
|
'django_extensions',
|
|
|
|
'regluit.frontend',
|
|
|
|
'regluit.api',
|
|
|
|
'regluit.core',
|
2011-09-27 12:48:11 +00:00
|
|
|
'regluit.payment',
|
2011-09-04 04:21:51 +00:00
|
|
|
'registration',
|
2011-09-06 01:04:49 +00:00
|
|
|
'social_auth',
|
2011-09-12 20:02:06 +00:00
|
|
|
'tastypie',
|
2011-10-20 03:31:16 +00:00
|
|
|
'djcelery',
|
2011-11-18 04:09:23 +00:00
|
|
|
'endless_pagination',
|
2011-11-18 14:22:21 +00:00
|
|
|
'selectable',
|
2011-12-29 17:50:09 +00:00
|
|
|
'regluit.frontend.templatetags',
|
2011-11-19 20:10:10 +00:00
|
|
|
|
|
|
|
# this must appear *after* django.frontend or else it overrides the
|
|
|
|
# registration templates in frontend/templates/registration
|
|
|
|
'django.contrib.admin',
|
|
|
|
|
2011-10-04 03:57:57 +00:00
|
|
|
)
|
|
|
|
|
2011-08-31 03:46:55 +00: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,
|
2011-09-10 11:36:38 +00:00
|
|
|
'disable_existing_loggers': True,
|
|
|
|
'formatters': {
|
|
|
|
'brief': {
|
|
|
|
'format': '%(asctime)s %(levelname)s %(name)s[%(funcName)s]: %(message)s',
|
|
|
|
},
|
|
|
|
},
|
2011-08-31 03:46:55 +00:00
|
|
|
'handlers': {
|
|
|
|
'mail_admins': {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'class': 'django.utils.log.AdminEmailHandler'
|
2011-09-04 04:21:51 +00:00
|
|
|
},
|
|
|
|
'file': {
|
|
|
|
'level': 'INFO',
|
|
|
|
'class': 'logging.handlers.RotatingFileHandler',
|
2011-09-10 11:36:38 +00:00
|
|
|
'filename': join(PROJECT_DIR, 'logs', 'unglue.it.log'),
|
|
|
|
'maxBytes': 1024*1024*5, # 5 MB
|
|
|
|
'backupCount': 5,
|
|
|
|
'formatter': 'brief',
|
2011-09-04 04:21:51 +00:00
|
|
|
},
|
2011-08-31 03:46:55 +00:00
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'django.request': {
|
|
|
|
'handlers': ['mail_admins'],
|
|
|
|
'level': 'ERROR',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
2011-09-10 11:36:38 +00:00
|
|
|
'': {
|
|
|
|
'handlers': ['file'],
|
|
|
|
'level': 'INFO',
|
|
|
|
}
|
2011-08-31 03:46:55 +00:00
|
|
|
}
|
|
|
|
}
|
2011-09-04 04:21:51 +00:00
|
|
|
|
2011-09-06 01:04:49 +00:00
|
|
|
# django-registration
|
2011-09-04 05:04:04 +00:00
|
|
|
EMAIL_HOST = 'smtp.gluejar.com'
|
|
|
|
DEFAULT_FROM_EMAIL = 'info@gluejar.com'
|
2011-09-04 04:21:51 +00:00
|
|
|
ACCOUNT_ACTIVATION_DAYS = 7
|
2011-09-04 05:04:04 +00:00
|
|
|
|
2011-09-18 23:45:23 +00:00
|
|
|
# django-socialauth
|
2011-09-06 01:50:55 +00:00
|
|
|
AUTHENTICATION_BACKENDS = (
|
|
|
|
'social_auth.backends.twitter.TwitterBackend',
|
|
|
|
'social_auth.backends.facebook.FacebookBackend',
|
|
|
|
'social_auth.backends.google.GoogleOAuthBackend',
|
|
|
|
'social_auth.backends.google.GoogleOAuth2Backend',
|
|
|
|
'social_auth.backends.google.GoogleBackend',
|
|
|
|
'social_auth.backends.yahoo.YahooBackend',
|
|
|
|
'social_auth.backends.contrib.linkedin.LinkedinBackend',
|
|
|
|
'social_auth.backends.OpenIDBackend',
|
|
|
|
'django.contrib.auth.backends.ModelBackend',
|
|
|
|
)
|
|
|
|
|
2011-09-06 03:50:38 +00:00
|
|
|
SOCIAL_AUTH_ENABLED_BACKENDS = ['google', 'facebook', 'twitter']
|
|
|
|
SOCIAL_AUTH_ASSOCIATE_BY_MAIL = True
|
2012-01-12 18:57:50 +00:00
|
|
|
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
|
2011-10-03 16:36:04 +00:00
|
|
|
|
2011-11-12 21:36:31 +00:00
|
|
|
TWITTER_EXTRA_DATA = [('profile_image_url', 'profile_image_url')]
|
2011-09-06 01:04:49 +00:00
|
|
|
|
2011-09-04 04:21:51 +00:00
|
|
|
LOGIN_URL = "/accounts/login/"
|
2011-09-06 01:04:49 +00:00
|
|
|
LOGIN_REDIRECT_URL = "/"
|
2011-09-04 04:21:51 +00:00
|
|
|
LOGOUT_URL = "/accounts/logout/"
|
2011-09-09 05:38:28 +00:00
|
|
|
|
2011-09-10 11:36:38 +00:00
|
|
|
USER_AGENT = "unglue.it.bot v0.0.1 <http://unglue.it>"
|
2011-09-30 01:57:12 +00:00
|
|
|
|
2011-10-11 02:31:24 +00:00
|
|
|
SOUTH_TESTS_MIGRATE = True
|
2011-10-03 16:36:04 +00:00
|
|
|
|
2011-12-28 17:31:35 +00:00
|
|
|
AUTH_PROFILE_MODULE = "core.UserProfile"
|
2011-10-20 03:31:16 +00:00
|
|
|
|
2011-11-06 19:58:51 +00:00
|
|
|
GOODREADS_API_KEY = ""
|
|
|
|
GOODREADS_API_SECRET = ""
|
|
|
|
|
2011-11-24 02:41:06 +00:00
|
|
|
# unglue.it parameters
|
|
|
|
UNGLUEIT_MINIMUM_TARGET = '1000' # in US Dollars
|
|
|
|
UNGLUEIT_LONGEST_DEADLINE = '180' # number of days allowed for a campaign
|
2011-11-29 15:48:37 +00:00
|
|
|
UNGLUEIT_SHORTEST_DEADLINE = '7' # minimum number of days allowed for a campaign
|
2012-01-15 19:55:56 +00:00
|
|
|
UNGLUEIT_RECOMMENDED_USERNAME = 'unglueit'
|
2011-12-20 14:15:57 +00:00
|
|
|
|
2011-12-20 14:45:10 +00:00
|
|
|
TEST_RUNNER = "djcelery.contrib.test_runner.CeleryTestSuiteRunner"
|
2011-12-20 14:15:57 +00:00
|
|
|
import djcelery
|
|
|
|
djcelery.setup_loader()
|
2012-01-15 19:56:26 +00:00
|
|
|
|
|
|
|
# this suppresses functionality that should not be visible on the alpha site
|
|
|
|
# change to 0 if you want to see it on your local machine
|
2012-01-15 20:37:08 +00:00
|
|
|
IS_PREVIEW = True
|