7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/webbynode/engines/django.rb', line 7
def prepare
unless io.file_exists?('settings.py')
raise Webbynode::Command::CommandError,
"Couldn't create the settings template because settings.py was not found. Please check and try again."
end
unless io.file_exists?('settings.template.py')
io.log 'Creating settings.template.py from your settings.py...'
io.copy_file 'settings.py', 'settings.template.py'
change_templates
change_settings({
'ENGINE' => '@app_engine@',
'NAME' => '@app_name@',
'USER' => '@app_name@',
'PASSWORD' => '@app_pwd@',
'HOST' => '@db_host@',
'PORT' => '@db_port@',
})
end
end
|