settings.py.erb 655 B

12345678910111213141516171819
  1. <% if @django_version >= 1.2 -%>
  2. DATABASES = {
  3. 'default': {
  4. 'NAME': '<%= @database['database'] %>',
  5. 'ENGINE': 'django.db.backends.<%= @database['adapter'] %>',
  6. 'USER': '<%= @database['username'] %>',
  7. 'PASSWORD': '<%= @database['password'] %>',
  8. 'HOST': '<%= @host %>',
  9. 'PORT': '<%= @database['port'] %>'
  10. }
  11. }
  12. <% else -%>
  13. DATABASE_ENGINE = '<%= @database['adapter'] %>'
  14. DATABASE_NAME = '<%= @database['database'] %>'
  15. DATABASE_USER = '<%= @database['username'] %>'
  16. DATABASE_PASSWORD = '<%= @database['password'] %>'
  17. DATABASE_HOST = '<%= @host %>'
  18. DATABASE_PORT = '<%= @database['port'] %>'
  19. <% end -%>