File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,23 @@ password = pytition
19
19
default-character-set = utf8
20
20
ENDOFFILE
21
21
22
- echo "Updating settings to use your my.cnf"
22
+ echo "Generating a basic config file"
23
+
24
+ echo "from .base import *" > pytition/pytition/settings/config.py
25
+ echo "SECRET_KEY = '$(python3 -c "from django.core.management.utils import get_random_secret_key as g; print(g())")'" >> pytition/pytition/settings/config.py
26
+ cat <<EOT >> pytition/pytition/settings/config.py
27
+ DATABASES = {
28
+ 'default': {
29
+ 'ENGINE': 'django.db.backends.mysql',
30
+ 'OPTIONS': {
31
+ 'read_default_file': '$PWD/my.cnf',
32
+ 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
33
+ },
34
+ }
35
+ }
36
+ EOT
23
37
24
- sed -i -e "s@/home/petition/www/@$PWD/@" pytition/pytition/ settings/base.py
38
+ export DJANGO_SETTINGS_MODULE= pytition. settings.config
25
39
26
40
echo "Running database migrations"
27
41
You can’t perform that action at this time.
0 commit comments