title: Django project settings for production and development
body: <p>In Django I have updated my git with pull from repo. And when I run <code>python3 manage.py collectstatic</code> it throws "myproject" database does not exist. Really I do not have myproject database because in production I have only prod_project database. But, somehow django is trying to load myproject database from base.py rather than loading from prod.py</p>
  
  <pre><code># base.py
      DATABASES = {                                                                        
              'default': {                                                                     
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',                          
                  'NAME': 'myproject',                                                       
                  'USER': 'admin',                                                            
                  'PASSWORD': '*****',
                  'ATOMIC_REQUESTS': True,                                                              
              },                                                                               
          }   
  
  # prod.py
      from .base import *                                                                  
  
      DEBUG = False                                                                        
      TEMPLATE_DEBUG = DEBUG                                                               
  
      DATABASES = {                                                                        
          'default': {                                                                     
              'ENGINE': 'django.db.backends.postgresql_psycopg2',                          
              'NAME': 'prod_myproject',                                                       
              'USER': 'admin',                                                            
              'PASSWORD': '',                                                              
          },                                                                               
      }                                                                                    
  
      try:                                                                                 
          from .local import *                                                             
      except ImportError:                                                                  
          pass
  
  # local.py is empty file
  </code></pre>
  
  <p>my project is in apps/project/prod folder:</p>
  
  <pre><code>/.git
  etc/
  apps/
  static/
  myproject/
    settings/
      base.py
      prod.py.
      beta.py
    wsgy.py
  manage.py
  </code></pre>