django-fobi/examples/simple/settings/docker.py

95 lines
2.4 KiB
Python
Raw Normal View History

2022-06-22 20:41:50 +00:00
from chromedriver_py import binary_path
from selenium import webdriver
2022-07-12 20:53:28 +00:00
2022-06-17 22:58:21 +00:00
from .bootstrap3_theme import *
def project_dir(base):
return os.path.abspath(
2022-07-12 20:53:28 +00:00
os.path.join(os.path.dirname(__file__), base).replace("\\", "/")
2022-06-17 22:58:21 +00:00
)
def gettext(s):
return s
PROJECT_DIR = project_dir
DEBUG = True
DEBUG_TOOLBAR = False
2022-06-22 20:41:50 +00:00
DEBUG_TEMPLATE = True
2022-06-17 22:58:21 +00:00
# TEMPLATE_DEBUG = True
DEV = True
2022-07-12 20:53:28 +00:00
POSTGRES_ENGINE = "django.db.backends.postgresql"
2022-06-17 22:58:21 +00:00
DATABASES = {
2022-07-12 20:53:28 +00:00
"default": {
"ENGINE": POSTGRES_ENGINE,
"HOST": "postgresql",
"NAME": "fobi",
"USER": "postgres",
"PASSWORD": "test",
2022-06-17 22:58:21 +00:00
}
}
TEST_DATABASES = {
2022-07-12 20:53:28 +00:00
"default": {
"ENGINE": POSTGRES_ENGINE,
"HOST": "postgresql",
"NAME": "fobi",
"USER": "postgres",
"PASSWORD": "test",
2022-06-17 22:58:21 +00:00
}
}
2022-06-22 22:59:46 +00:00
# FeinCMS addons
INSTALLED_APPS += [
2022-07-12 20:53:28 +00:00
"feincms", # FeinCMS
"fobi.contrib.apps.feincms_integration", # Fobi FeinCMS app
"page", # Example
2022-06-22 22:59:46 +00:00
]
MIGRATION_MODULES = {
2022-07-12 20:53:28 +00:00
"fobi": "fobi.migrations",
"db_store": "fobi.contrib.plugins.form_handlers.db_store.migrations",
"page": "page.migrations",
2022-06-22 22:59:46 +00:00
}
2022-07-12 20:53:28 +00:00
INTERNAL_IPS = ("127.0.0.1",)
ALLOWED_HOSTS = ["*"]
2022-06-17 22:58:21 +00:00
2022-07-12 20:53:28 +00:00
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = PROJECT_DIR("../../tmp")
2022-06-17 22:58:21 +00:00
FOBI_DEBUG = True
FOBI_RESTRICT_PLUGIN_ACCESS = False
FOBI_RESTRICT_FIELDS_ACCESS = False
2022-07-12 20:53:28 +00:00
FOBI_FORM_ELEMENT_SELECT_MODEL_OBJECT_IGNORED_MODELS = ["auth.User"]
2022-06-17 22:58:21 +00:00
FOBI_FAIL_ON_MISSING_FORM_ELEMENT_PLUGINS = True
# FOBI_FAIL_ON_MISSING_FORM_HANDLER_PLUGINS = False
FOBI_FAIL_ON_ERRORS_IN_FORM_HANDLER_PLUGINS = True
# FOBI_DEFAULT_THEME = 'foundation5'
FOBI_FAIL_ON_MISSING_FORM_HANDLER_PLUGINS = True
FOBI_FAIL_ON_MISSING_FORM_WIZARD_HANDLER_PLUGINS = True
FOBI_FAIL_ON_ERRORS_IN_FORM_ELEMENT_PLUGINS = False
# FOBI_FAIL_ON_ERRORS_IN_FORM_HANDLER_PLUGINS = True
FOBI_FAIL_ON_ERRORS_IN_FORM_WIZARD_HANDLER_PLUGINS = True
# WAIT_BETWEEN_TEST_STEPS = 0
2022-06-18 05:39:30 +00:00
# FOBI_WAIT_AT_TEST_END = False
2022-06-17 22:58:21 +00:00
ENABLE_CAPTCHA = True
CHROME_DRIVER_OPTIONS = webdriver.ChromeOptions()
2022-07-12 20:53:28 +00:00
CHROME_DRIVER_OPTIONS.add_argument("-headless")
CHROME_DRIVER_OPTIONS.add_argument("-no-sandbox")
CHROME_DRIVER_OPTIONS.set_capability("chrome.binary", "/usr/bin/google-chrome")
2022-06-17 22:58:21 +00:00
# CHROME_DRIVER_OPTIONS.add_argument('-single-process')
CHROME_DRIVER_EXECUTABLE_PATH = binary_path # '/usr/bin/chromedriver'
2022-07-12 20:53:28 +00:00
FIREFOX_BIN_PATH = "/usr/lib/firefox/firefox"
PHANTOM_JS_EXECUTABLE_PATH = ""