forked from poise/application_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py.erb
More file actions
20 lines (19 loc) · 758 Bytes
/
settings.py.erb
File metadata and controls
20 lines (19 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
DEBUG = <%= @debug ? "True" : "False" %>
DATABASES = {
'default': {
'NAME': '<%= @database[:settings][:database] %>',
'ENGINE': 'django.db.backends.<%= @database[:settings][:adapter] %>',
'USER': '<%= @database[:settings][:username] %>',
'PASSWORD': '<%= @database[:settings][:password] %>',
'HOST': '<%= @database[:host] %>',
'PORT': '<%= @database[:settings][:port] %>',
},
}
<% if @database[:legacy] -%>
DATABASE_ENGINE = DATABASES['default']['ENGINE']
DATABASE_NAME = DATABASES['default']['NAME']
DATABASE_USER = DATABASES['default']['USER']
DATABASE_PASSWORD = DATABASES['default']['PASSWORD']
DATABASE_HOST = DATABASES['default']['HOST']
DATABASE_PORT = DATABASES['default']['PORT']
<% end -%>