Beispiel #1
0
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    ('admin', '*****@*****.**'),
)

MANAGERS = ADMINS

from deploy import get_secret
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'HWS_product' if PRODUCT_MODE else 'HWS_dev',           # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': '******',
        'PASSWORD': get_secret.get_password(),
        'HOST': 'mydb.cbehtrcqce74.us-west-2.rds.amazonaws.com',   # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '3306',                      # Set to empty string for default.
    }
}

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'
Beispiel #2
0
WSGI_APPLICATION = 'PeeTwitt.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases

DATABASES = {}
if not PRODUCT:
    from deploy.get_secret import get_password
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
            'NAME': 'PeeTwitt',                      # Or path to database file if using sqlite3.
            'USER': '******',                      # Not used with sqlite3.
            'PASSWORD': get_password(),                  # Not used with sqlite3.
            'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
            'PORT': '3306',                      # Set to empty string for default. Not used with sqlite3.
        }
    }
else:
    import dj_database_url
    DATABASES['default'] =  dj_database_url.config()


# Template setting
TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    os.path.abspath(os.path.join(BASE_DIR, "templates")),
Beispiel #3
0
djcelery.setup_loader()

BROKER_URL = "redis://localhost:6379/0"

# Let Celery workers import our tasks module
CELERY_IMPORTS = ("tasks",)

from deploy import get_secret

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.mysql",  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        "NAME": "product_secret" if PRODUCT_MODE else "my_dev",  # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        "USER": "******",
        "PASSWORD": get_secret.get_password(),
        "HOST": "mydb.cbehtrcqce74.us-west-2.rds.amazonaws.com",  # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        "PORT": "3306",  # Set to empty string for default.
    }
}

# Parse database configuration from $DATABASE_URL
# import dj_database_url
# DATABASES['default'] =  dj_database_url.config()

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["purdue-class.chenrendong.com"]

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name