# -*- coding: utf-8 -*-
###########################################
## CMB application settings: ##
###########################################
# Essential settings:
CMBARTER_HOST = "www.multiswap.net" # Set this to the web-server address.
CMBARTER_DSN = "dbname=cmbarter" # Set this to the PostgreSQL database connection string. Example: "host=x port=x dbname=x user=x password=x sslmode=x"
CMBARTER_DEBUG_MODE = True # Set this to "False" in production.
# Sign-up and log-in settings:
CMBARTER_MIN_PASSWORD_LENGTH = 8
CMBARTER_SHOW_CAPTCHA_ON_SIGNUP = True
CMBARTER_SHOW_CAPTCHA_ON_REPETITIVE_LOGIN = True
CMBARTER_REGISTRATION_KEY_IS_REQUIRED = False
CMBARTER_REGISTRATION_KEY_HELP_URL = '' # If a registration key is required for signing up, this should point to an URL where users will be instructed how to obtain one. Review cmbarter/modules/keygen.py to learn how to generate valid registration keys.
# You should obtain your own public/private key pair from www.google.com/recaptcha and put it here:
RECAPTCHA_PUBLIC_KEY='6Ledx7wSAAAAAICFw8vB-2ghpDjzGogPRi6-3FCr'
RECAPTCHA_PIVATE_KEY='6Ledx7wSAAAAAEskQ7Mbi-oqneHDSFVUkxGitn_y'
assert CMBARTER_SHOW_CAPTCHA_ON_SIGNUP or CMBARTER_REGISTRATION_KEY_IS_REQUIRED
assert CMBARTER_SHOW_CAPTCHA_ON_REPETITIVE_LOGIN or CMBARTER_MIN_PASSWORD_LENGTH > 10
# Miscellaneous settings:
CMBARTER_SEARCH_PARTNERS_URL = '' # Set this to a page-URL where users can search for trusted partners.
CMBARTER_HOST_IS_SPAM_LISTED = False # Set this to "True" if your server gets listed in the spam blacklists.
CMBARTER_MAX_IMAGE_SIZE = 1e6 # Set this to the maximum allowed file size in bytes.
CMBARTER_INSERT_BIDI_MARKS = False # Set this to "True" if you do not care about IE6.
CMBARTER_HISTORY_HORISON_DAYS = 26
CMBARTER_SESSION_TOUCH_MINUTES = 30
CMBARTER_PRICE_PREFIXES = [u'$', u'\u00A3', u'\u00A4', u'\u20AC']
CMBARTER_PRICE_SUFFIXES = [u'\u00A4', u'\u20AC', u'ЛВ', u'ЛВ.']
CMBARTER_TRX_COST_QUOTA = 50000.0
CMBARTER_TURN_IS_RUNNING_TEMPLATE = 'turn_is_running.html'
CMBARTER_TURN_IS_RUNNING_MOBILE_TEMPLATE = 'xhtml-mp/turn_is_running.html'
CMBARTER_DEV_STATIC_ROOT = '/usr/local/share/cmbarter/static'
CMBARTER_DOC_ROOT_URL = 'http://%s/doc' % CMBARTER_HOST
###########################################
## Django settings: ##
###########################################
DEBUG = CMBARTER_DEBUG_MODE
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
# 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.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en' # Example RTL script -- 'ar-dz'
LANGUAGES = (
('en', u'english'),
('bg', u'български'),
)
LANGUAGE_COOKIE_NAME = 'cmbarter_language'
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'vjgz%^^7f6-=#%f&5y8qw2ous-l6zz!h+rkpzmxx(ozp%^xeb)'
# 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',
) if DEBUG else (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
MIDDLEWARE_CLASSES = (
'django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
)
ROOT_URLCONF = 'cmbarter.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.
'/usr/local/share/cmbarter/cmbarter/templates',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'cmbarter.users',
'cmbarter.profiles',
'cmbarter.products',
'cmbarter.deposits',
'cmbarter.deals',
'cmbarter.orders',
'cmbarter.mobile',
)
SESSION_ENGINE="django.contrib.sessions.backends.file"
SESSION_FILE_PATH="/var/tmp/cmbarter"
SESSION_COOKIE_SECURE=False if DEBUG else True
SESSION_EXPIRE_AT_BROWSER_CLOSE=True
SESSION_COOKIE_DOMAIN=None if DEBUG else CMBARTER_HOST
CSRF_COOKIE_DOMAIN = SESSION_COOKIE_DOMAIN
CSRF_FAILURE_VIEW = 'cmbarter.users.views.csrf_abort'