2013-06-03 16:31:39 +00:00
|
|
|
import datetime
|
2011-08-31 03:46:55 +00:00
|
|
|
from os.path import dirname, realpath, join
|
2013-06-03 16:31:39 +00:00
|
|
|
|
2012-04-05 20:56:42 +00:00
|
|
|
import regluit
|
2012-05-18 23:59:48 +00:00
|
|
|
from regluit.payment.parameters import PAYMENT_HOST_PAYPAL, PAYMENT_HOST_AMAZON
|
2011-08-31 03:46:55 +00:00
|
|
|
|
|
|
|
PROJECT_DIR = dirname(dirname(realpath(__file__)))
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
2013-11-15 16:25:41 +00:00
|
|
|
LOCAL_TEST = False
|
2011-08-31 03:46:55 +00:00
|
|
|
|
2012-07-21 20:26:16 +00:00
|
|
|
WISHED_LANGS = ('en','fr','es','de','el','pt','it','ru','cs','ja','zh','nl','ut','ar','la','id','ca','fa','sv','sl','ko','tr')
|
|
|
|
|
2011-08-31 03:46:55 +00:00
|
|
|
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/"
|
2013-08-08 22:21:33 +00:00
|
|
|
MEDIA_URL = '/media/'
|
2011-08-31 03:46:55 +00:00
|
|
|
|
2012-07-27 18:23:19 +00:00
|
|
|
CKEDITOR_UPLOAD_PATH = ''
|
|
|
|
CKEDITOR_RESTRICT_BY_USER = True
|
|
|
|
CKEDITOR_CONFIGS = {
|
|
|
|
'default': {
|
|
|
|
'width': 700,
|
2012-09-24 18:21:15 +00:00
|
|
|
'toolbar': [
|
|
|
|
['Cut','Copy','Paste', 'PasteFromWord', '-', 'Undo', 'Redo', '-', 'Source'],
|
|
|
|
['Bold', 'Italic', '-', 'NumberedList','BulletedList', '-','Blockquote'],
|
|
|
|
['Find','Replace','-', 'Scayt'],
|
|
|
|
['Link', 'Unlink', '-', 'Image', 'HorizontalRule']
|
|
|
|
],
|
2012-07-27 18:23:19 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2011-08-31 03:46:55 +00: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/"
|
|
|
|
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/".
|
2012-09-06 05:01:17 +00:00
|
|
|
# ADMIN_MEDIA_PREFIX = '/static/admin/'
|
2011-08-31 03:46:55 +00:00
|
|
|
|
|
|
|
# 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',
|
2012-03-29 20:26:22 +00:00
|
|
|
'regluit.context_processors.count_unseen',
|
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',
|
2012-05-17 20:28:48 +00:00
|
|
|
'maintenancemode.middleware.MaintenanceModeMiddleware',
|
2013-04-09 04:05:31 +00:00
|
|
|
'social_auth.middleware.SocialAuthExceptionMiddleware',
|
2011-08-31 03:46:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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',
|
2012-04-11 16:51:18 +00:00
|
|
|
'django.contrib.contenttypes',
|
2011-08-31 03:46:55 +00:00
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.sites',
|
2013-03-09 22:37:33 +00:00
|
|
|
'django.contrib.sitemaps',
|
2011-08-31 03:46:55 +00:00
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
2011-12-31 03:08:04 +00:00
|
|
|
'django.contrib.comments',
|
2012-05-13 19:32:32 +00:00
|
|
|
'django.contrib.humanize',
|
2011-08-31 03:46:55 +00:00
|
|
|
'south',
|
|
|
|
'django_extensions',
|
|
|
|
'regluit.frontend',
|
|
|
|
'regluit.api',
|
|
|
|
'regluit.core',
|
2014-10-18 02:48:51 +00:00
|
|
|
'regluit.marc',
|
2011-09-27 12:48:11 +00:00
|
|
|
'regluit.payment',
|
2012-03-07 19:42:16 +00:00
|
|
|
'regluit.utils',
|
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',
|
2012-04-11 16:51:18 +00:00
|
|
|
'regluit.payment.templatetags',
|
2012-03-27 15:52:23 +00:00
|
|
|
'notification',
|
2013-03-27 19:03:30 +00:00
|
|
|
'email_change',
|
2012-07-27 18:23:19 +00:00
|
|
|
'ckeditor',
|
2013-02-04 20:33:57 +00:00
|
|
|
'storages',
|
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
|
2013-02-04 20:33:57 +00:00
|
|
|
'django.contrib.admin',
|
2013-08-30 18:17:45 +00:00
|
|
|
'regluit.booxtream',
|
2013-09-21 00:59:40 +00:00
|
|
|
'regluit.pyepub',
|
2013-10-02 16:02:08 +00:00
|
|
|
'regluit.libraryauth',
|
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'
|
2012-07-09 17:43:48 +00:00
|
|
|
DEFAULT_FROM_EMAIL = 'notices@gluejar.com'
|
|
|
|
SERVER_EMAIL = 'notices@gluejar.com'
|
2013-03-27 21:57:08 +00:00
|
|
|
SUPPORT_EMAIL = 'support@gluejar.com'
|
2012-03-03 22:26:50 +00:00
|
|
|
ACCOUNT_ACTIVATION_DAYS = 30
|
2013-03-21 14:13:32 +00:00
|
|
|
SESSION_COOKIE_AGE = 3628800 # 6 weeks
|
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']
|
2013-03-15 16:29:11 +00:00
|
|
|
#SOCIAL_AUTH_ASSOCIATE_BY_MAIL = True
|
2012-01-12 18:57:50 +00:00
|
|
|
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
|
2013-03-18 18:56:27 +00:00
|
|
|
FACEBOOK_SOCIAL_AUTH_BACKEND_ERROR_URL = '/'
|
|
|
|
SOCIAL_AUTH_SLUGIFY_USERNAMES = True
|
2013-03-15 03:46:01 +00:00
|
|
|
# following is needed because of length limitations in a unique constrain for MySQL
|
|
|
|
# see https://github.com/omab/django-social-auth/issues/539
|
|
|
|
SOCIAL_AUTH_UID_LENGTH = 222
|
|
|
|
SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = 200
|
|
|
|
SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = 135
|
|
|
|
SOCIAL_AUTH_ASSOCIATION_HANDLE_LENGTH = 125
|
2011-10-03 16:36:04 +00:00
|
|
|
|
2013-03-15 16:29:11 +00:00
|
|
|
SOCIAL_AUTH_PIPELINE = (
|
2013-03-18 18:56:27 +00:00
|
|
|
'regluit.core.auth.selectively_associate',
|
2013-03-15 16:29:11 +00:00
|
|
|
'social_auth.backends.pipeline.associate.associate_by_email',
|
|
|
|
'social_auth.backends.pipeline.user.get_username',
|
|
|
|
'social_auth.backends.pipeline.user.create_user',
|
|
|
|
'social_auth.backends.pipeline.social.associate_user',
|
2013-03-18 18:56:27 +00:00
|
|
|
'regluit.core.auth.deliver_extra_data',
|
2013-03-15 16:29:11 +00:00
|
|
|
'social_auth.backends.pipeline.user.update_user_details'
|
|
|
|
)
|
|
|
|
|
2013-03-18 18:56:27 +00:00
|
|
|
TWITTER_EXTRA_DATA = [('profile_image_url_https', 'profile_image_url_https'),('screen_name','screen_name')]
|
2011-09-06 01:04:49 +00:00
|
|
|
|
2013-03-08 02:53:32 +00:00
|
|
|
LOGIN_URL = "/accounts/superlogin/"
|
2011-09-06 01:04:49 +00:00
|
|
|
LOGIN_REDIRECT_URL = "/"
|
2011-09-04 04:21:51 +00:00
|
|
|
LOGOUT_URL = "/accounts/logout/"
|
2013-04-09 04:05:31 +00:00
|
|
|
LOGIN_ERROR_URL = '/accounts/login-error/'
|
2011-09-09 05:38:28 +00:00
|
|
|
|
2013-03-09 18:29:03 +00:00
|
|
|
USER_AGENT = "unglue.it.bot v0.0.1 <https://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
|
|
|
|
2012-03-26 20:18:31 +00:00
|
|
|
# The amount of the transaction that Gluejar takes
|
|
|
|
GLUEJAR_COMMISSION = 0.06
|
|
|
|
PREAPPROVAL_PERIOD = 365 # days to ask for in a preapproval
|
|
|
|
PREAPPROVAL_PERIOD_AFTER_CAMPAIGN = 90 # if we ask for preapproval time after a campaign deadline
|
|
|
|
|
2012-11-12 19:22:20 +00:00
|
|
|
# How many days we will try to collect on failed transactions until they are written off
|
2014-10-19 23:30:59 +00:00
|
|
|
RECHARGE_WINDOW = 14
|
2012-11-12 19:22:20 +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
|
2013-08-08 23:56:26 +00:00
|
|
|
UNGLUEIT_MINIMUM_TARGET = 500 # in US Dollars
|
|
|
|
UNGLUEIT_MAXIMUM_TARGET = 10000000 # in US Dollars
|
2011-11-24 02:41:06 +00:00
|
|
|
UNGLUEIT_LONGEST_DEADLINE = '180' # number of days allowed for a campaign
|
2012-01-15 19:55:56 +00:00
|
|
|
UNGLUEIT_RECOMMENDED_USERNAME = 'unglueit'
|
2013-08-08 23:56:26 +00:00
|
|
|
B2U_TERM = datetime.timedelta(days=5*365 +1 ) # 5 years?
|
2013-08-09 23:00:54 +00:00
|
|
|
MAX_CC_DATE = datetime.date( 2099,12,31)
|
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
|
|
|
|
2012-02-06 20:02:57 +00:00
|
|
|
# set once instead of in all the templates
|
2012-02-14 16:28:48 +00:00
|
|
|
JQUERY_HOME = "/static/js/jquery-1.7.1.min.js"
|
2012-02-06 20:02:57 +00:00
|
|
|
JQUERY_UI_HOME = "/static/js/jquery-ui-1.8.16.custom.min.js"
|
2012-03-27 21:53:07 +00:00
|
|
|
|
2012-04-04 16:15:18 +00:00
|
|
|
# Mailchimp archive JavaScript URL
|
2015-01-02 05:33:32 +00:00
|
|
|
CAMPAIGN_ARCHIVE_JS = "http://us2.campaign-archive1.com/generate-js/?u=15472878790f9faa11317e085&fid=28161&show=10"
|
2012-04-05 20:54:46 +00:00
|
|
|
|
|
|
|
# periodic tasks for celery
|
|
|
|
# start out with nothing scheduled
|
|
|
|
CELERYBEAT_SCHEDULE = {}
|
2012-04-27 21:29:57 +00:00
|
|
|
from celery.schedules import crontab
|
2012-04-05 20:54:46 +00:00
|
|
|
# define some periodic tasks
|
|
|
|
|
|
|
|
SEND_TEST_EMAIL_JOB = {
|
|
|
|
"task": "regluit.core.tasks.send_mail_task",
|
2012-06-30 01:03:56 +00:00
|
|
|
"schedule": crontab(hour=18, minute=20),
|
|
|
|
"args": ('hi there 18:20', 'testing 1, 2, 3', 'notices@gluejar.com', ['raymond.yee@gmail.com'])
|
|
|
|
}
|
|
|
|
|
|
|
|
UPDATE_ACTIVE_CAMPAIGN_STATUSES = {
|
|
|
|
"task": "regluit.core.tasks.update_active_campaign_status",
|
2012-06-30 01:22:19 +00:00
|
|
|
"schedule": crontab(hour=0, minute=1),
|
2012-06-30 01:03:56 +00:00
|
|
|
"args": ()
|
2012-04-05 20:54:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
EMIT_NOTIFICATIONS_JOB = {
|
|
|
|
"task": "regluit.core.tasks.emit_notifications",
|
|
|
|
"schedule": datetime.timedelta(seconds=60),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2012-04-27 21:29:57 +00:00
|
|
|
EBOOK_NOTIFICATIONS_JOB = {
|
|
|
|
"task": "regluit.core.tasks.report_new_ebooks",
|
|
|
|
"schedule": crontab(hour=0, minute=30),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2012-11-21 16:09:18 +00:00
|
|
|
NOTIFY_ENDING_SOON_JOB = {
|
|
|
|
"task": "regluit.core.tasks.notify_ending_soon",
|
|
|
|
"schedule": crontab(hour=1, minute=0),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2013-11-08 17:13:34 +00:00
|
|
|
REFRESH_ACQS_JOB = {
|
|
|
|
"task": "regluit.core.tasks.refresh_acqs",
|
|
|
|
"schedule": datetime.timedelta(minutes=10),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2013-03-01 22:43:43 +00:00
|
|
|
UPDATE_ACCOUNT_STATUSES = {
|
2013-08-03 22:42:33 +00:00
|
|
|
"task": "regluit.payment.tasks.update_account_status",
|
2013-03-01 22:43:43 +00:00
|
|
|
"schedule": crontab(day_of_month=1, hour=0, minute=0),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2013-03-04 19:19:13 +00:00
|
|
|
NOTIFY_EXPIRING_ACCOUNTS = {
|
2013-08-03 22:42:33 +00:00
|
|
|
"task": "regluit.payment.tasks.notify_expiring_accounts",
|
2013-03-04 19:19:13 +00:00
|
|
|
"schedule": crontab(day_of_month=22, hour=0, minute=30),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2015-01-23 18:11:19 +00:00
|
|
|
NOTIFY_UNCLAIMED_GIFTS = {
|
|
|
|
"task": "regluit.core.tasks.notify_unclaimed_gifts",
|
|
|
|
"schedule": crontab( hour=2, minute=15),
|
|
|
|
"args": ()
|
|
|
|
}
|
|
|
|
|
2012-04-11 16:53:20 +00:00
|
|
|
# by default, in common, we don't turn any of the celerybeat jobs on -- turn them on in the local settings file
|
|
|
|
|
2013-03-05 04:11:50 +00:00
|
|
|
# set notification queueing on
|
|
|
|
NOTIFICATION_QUEUE_ALL = True
|
2012-05-03 01:34:13 +00:00
|
|
|
# amazon or paypal for now.
|
2012-09-24 23:29:20 +00:00
|
|
|
PAYMENT_PROCESSOR = 'stripelib'
|
2012-05-03 23:48:51 +00:00
|
|
|
|
2012-05-08 23:08:36 +00:00
|
|
|
# a SECRET_KEY to be used for encrypting values in core.models.Key -- you should store in settings/local.py
|
|
|
|
SECRET_KEY = ''
|
2012-05-17 20:28:48 +00:00
|
|
|
|
|
|
|
# by default, we are not in maintenance mode -- set True in overriding settings files for maintenance mode
|
|
|
|
# http://pypi.python.org/pypi/django-maintenancemode/
|
|
|
|
MAINTENANCE_MODE = False
|
|
|
|
# Sequence of URL path regexes to exclude from the maintenance mode.
|
|
|
|
MAINTENANCE_IGNORE_URLS = {}
|
2012-09-06 05:01:17 +00:00
|
|
|
|
|
|
|
class NONPROFIT:
|
2012-10-12 17:47:26 +00:00
|
|
|
is_on = False
|
2012-09-06 05:01:17 +00:00
|
|
|
name = 'Library Renewal'
|
2012-10-02 20:08:55 +00:00
|
|
|
link = 'http://127.0.0.1:8000/donate_to_campaign/'
|
2012-10-23 14:24:16 +00:00
|
|
|
|
|
|
|
# we should suppress Google Analytics outside of production
|
|
|
|
SHOW_GOOGLE_ANALYTICS = False
|
2013-02-04 20:33:57 +00:00
|
|
|
|
2013-02-08 17:57:23 +00:00
|
|
|
# to enable uploading to S3 and integration of django-storages + django-ckeditor
|
|
|
|
# some variables to be overriddden in more specific settings files -- e.g., prod.py,
|
2013-02-04 20:33:57 +00:00
|
|
|
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
|
2013-02-08 17:57:23 +00:00
|
|
|
AWS_ACCESS_KEY_ID = ''
|
|
|
|
AWS_SECRET_ACCESS_KEY = ''
|
|
|
|
AWS_STORAGE_BUCKET_NAME = ''
|
2013-08-08 22:21:33 +00:00
|
|
|
AWS_QUERYSTRING_AUTH = False
|
2013-02-04 20:33:57 +00:00
|
|
|
|
2013-03-04 22:01:33 +00:00
|
|
|
MAILCHIMP_API_KEY = '5f8e846a2bbc847807ed89086de4b4bf-us2'
|
2013-03-12 18:52:43 +00:00
|
|
|
MAILCHIMP_NEWS_ID = u'c5cce92fe1'
|
2013-08-08 22:21:33 +00:00
|
|
|
|
|
|
|
FORMATS = (
|
|
|
|
('pdf','PDF'),
|
|
|
|
('epub','EPUB'),
|
|
|
|
('html','HTML'),
|
|
|
|
('text','TEXT'),
|
|
|
|
('mobi','MOBI'),
|
|
|
|
)
|
|
|
|
CONTENT_TYPES = {
|
|
|
|
'pdf': 'application/pdf',
|
|
|
|
'epub': 'application/epub+zip',
|
|
|
|
'html': 'text/html',
|
|
|
|
'text': 'text/plain',
|
|
|
|
'mobi': 'application/x-mobipocket-ebook'
|
|
|
|
}
|
|
|
|
|
2014-10-14 14:08:08 +00:00
|
|
|
# if you add more of these, make sure core/marc.py can deal
|
2013-08-08 22:21:33 +00:00
|
|
|
MARC_CHOICES = (
|
|
|
|
('DIRECT', 'Raw link'),
|
|
|
|
('UNGLUE', 'Unglue.it link'),
|
2013-09-23 16:39:47 +00:00
|
|
|
('B2U', 'Library link'),
|
|
|
|
)
|
|
|
|
MARC_PREF_OPTIONS =(
|
|
|
|
('DIRECT', 'Raw link'),
|
|
|
|
('UNGLUE', 'Unglue.it link'),
|
2013-08-08 22:21:33 +00:00
|
|
|
)
|
|
|
|
|
2013-08-23 21:14:48 +00:00
|
|
|
BOOXTREAM_API_KEY = '7ynRCsx4q21zEY67it7yk8u5rc6EXY'
|
|
|
|
BOOXTREAM_API_USER = 'ungluetest'
|
2013-08-29 00:13:35 +00:00
|
|
|
BOOXTREAM_TEST_EPUB_URL = 'https://github.com/Gluejar/open_access_ebooks_ebook/raw/master/download/open_access_ebooks.epub'
|
2014-08-28 19:29:41 +00:00
|
|
|
TEST_PDF_URL = "https://github.com/Gluejar/flatland/raw/master/downloads/Flatland.pdf"
|
2013-08-27 03:54:19 +00:00
|
|
|
FILE_UPLOAD_MAX_MEMORY_SIZE = 20971520 #20MB
|
2014-05-20 16:19:34 +00:00
|
|
|
|
|
|
|
DROPBOX_KEY = '4efhwty5aph52bd' #for unglue.it, just.unglue.it
|
|
|
|
#DROPBOX_KEY = '6uefhocpvp0s1ep' #for localhost
|