Server IP : 85.214.239.14 / Your IP : 18.116.24.238 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /srv/modoboa/env/lib64/python3.5/site-packages/modoboa/ |
Upload File : |
import os # Database # https://docs.djangoproject.com/en/2.2/ref/settings/#databases DB = os.environ.get("DB", "POSTGRESQL") if DB == "MYSQL": DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "modoboa", "USER": "root", "PASSWORD": "", "HOST": "localhost", "PORT": "", "ATOMIC_REQUESTS": True, # MySQL's Strict Mode fixes many data integrity problems in MySQL, # such as data truncation upon insertion, by escalating warnings # into errors. It is strongly recommended you activate it. # MySQL >= 5.7 set STRICT_TRANS_TABLES by default # See: # https://docs.djangoproject.com/en/2.2/ref/databases/#mysql-sql-mode "OPTIONS": { "init_command": ( "SET sql_mode = 'STRICT_TRANS_TABLES';" "SET innodb_strict_mode = ON;" ), "charset": "utf8", }, "TEST": { "CHARSET": "utf8", "COLLATION": "utf8_unicode_ci", }, }, } elif DB == "SQLITE": DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "modoboa.db", "PORT": "", "ATOMIC_REQUESTS": True, }, } else: DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "modoboa", "USER": "postgres", "PASSWORD": "", "HOST": "localhost", "PORT": "", "ATOMIC_REQUESTS": True, "OPTIONS": { "client_encoding": "UTF8", }, "TEST": { "CHARSET": "UTF8", }, }, }