[go: up one dir, main page]

Menu

[r2332]: / trunk / cmbarter / settings.py  Maximize  Restore  History

Download this file

151 lines (115 with data), 5.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# -*- 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'