| 1 |
import os |
| 2 |
import sys |
| 3 |
|
| 4 |
|
| 5 |
SITE_ID = 1 |
| 6 |
|
| 7 |
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) |
| 8 |
|
| 9 |
PYTHON_VERSION = "%s.%s" % sys.version_info[:2] |
| 10 |
|
| 11 |
|
| 12 |
DATABASES = { |
| 13 |
"default": { |
| 14 |
"ENGINE": "django.db.backends.sqlite3", |
| 15 |
"NAME": os.path.join(PROJECT_PATH, "django-simple-captcha.db"), |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
DATABASE_SUPPORTS_TRANSACTIONS = True |
| 23 |
|
| 24 |
INSTALLED_APPS = [ |
| 25 |
"django.contrib.auth", |
| 26 |
"django.contrib.admin", |
| 27 |
"django.contrib.contenttypes", |
| 28 |
"django.contrib.sessions", |
| 29 |
"django.contrib.sites", |
| 30 |
"django.forms", |
| 31 |
"django.contrib.messages", |
| 32 |
|
| 33 |
"captcha", |
| 34 |
] |
| 35 |
FORM_RENDERER = "django.forms.renderers.TemplatesSetting" |
| 36 |
|
| 37 |
LANGUAGE_CODE = "en" |
| 38 |
|
| 39 |
LANGUAGES = ( |
| 40 |
("en", "English"), |
| 41 |
語')), |
| 42 |
) |
| 43 |
|
| 44 |
FIXTURE_DIRS = (os.path.join(PROJECT_PATH, "fixtures"),) |
| 45 |
|
| 46 |
ROOT_URLCONF = "testproject.urls" |
| 47 |
|
| 48 |
DEBUG = True |
| 49 |
|
| 50 |
TEMPLATES = [ |
| 51 |
{ |
| 52 |
"BACKEND": "django.template.backends.django.DjangoTemplates", |
| 53 |
"APP_DIRS": True, |
| 54 |
"OPTIONS": { |
| 55 |
"debug": False, |
| 56 |
"context_processors": ( |
| 57 |
"django.template.context_processors.request", |
| 58 |
"django.contrib.auth.context_processors.auth", |
| 59 |
"django.template.context_processors.debug", |
| 60 |
"django.template.context_processors.i18n", |
| 61 |
"django.template.context_processors.media", |
| 62 |
"django.template.context_processors.static", |
| 63 |
"django.template.context_processors.tz", |
| 64 |
"django.contrib.messages.context_processors.messages", |
| 65 |
), |
| 66 |
}, |
| 67 |
"DIRS": ("templates",), |
| 68 |
} |
| 69 |
] |
| 70 |
|
| 71 |
USE_TZ = True |
| 72 |
SECRET_KEY = "empty" |
| 73 |
MIDDLEWARE = ( |
| 74 |
"django.contrib.sessions.middleware.SessionMiddleware", |
| 75 |
"django.contrib.auth.middleware.AuthenticationMiddleware", |
| 76 |
"django.contrib.messages.middleware.MessageMiddleware", |
| 77 |
) |
| 78 |
|
| 79 |
|
| 80 |
CAPTCHA_FLITE_PATH = os.environ.get("CAPTCHA_FLITE_PATH", None) |
| 81 |
CAPTCHA_SOX_PATH = os.environ.get("CAPTCHA_SOX_PATH", None) |
| 82 |
CAPTCHA_BACKGROUND_COLOR = "transparent" |
| 83 |
CAPTCHA_LETTER_COLOR_FUNCT = "captcha.helpers.random_letter_color_challenge" |
| 84 |
|