Changeset 14144


Ignore:
Timestamp:
04/17/12 17:47:52 (12 years ago)
Author:
sil
Message:

fixed import of database settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/sara_cmt/settings.py

    r14129 r14144  
    2424
    2525# The database settings are imported, due to confidential data which should be
    26 # excluded from the SVN repository. An example of the needed info for database
    27 # configuration is commented out.
    28 # DATABASE_ENGINE    = 'postgresql_psycopg2'
    29 # DATABASE_NAME      = 'my_database'
    30 # DATABASE_USER      = 'db_user'
    31 # DATABASE_PASSWORD  = 'secret'
    32 # DATABASE_HOST      = 'database.example.com'
    33 from settings_db import *
     26# excluded from the SVN repository.
     27try:
     28    from settings_db import *
     29except ImportError:
     30    print '''\
     31Settings for database are missing. Be sure to have `settings_db.py` with:
     32
     33DATABASES = {
     34    'default': {
     35        'ENGINE': '<engine>',
     36        'NAME': '<name>',
     37        'USER': '<user>',
     38        'PASSWORD': '<password>',
     39        'HOST': '<host>'
     40    }
     41}
     42
     43See https://docs.djangoproject.com/en/1.2/ref/settings/#databases'''
     44    exit(1)
    3445
    3546
Note: See TracChangeset for help on using the changeset viewer.