Beispiel #1
0
import os
from django.conf import settings

#DEBUG = False
#TEMPLATE_DEBUG = False

DATABASES = settings.DATABASES

MYSQL_HOST = 'w.rdc.sae.sina.com.cn'
MYSQL_PORT = '3307'
MYSQL_USER = '******' #ACCESSKEY
MYSQL_PASS = '******' #SECRETKEY
MYSQL_DB   = 'app_zakkabag'

if not 'SERVER_SOFTWARE' in os.environ:
	import sae
	from sae._restful_mysql import monkey
	monkey.patch()

DATABASES = {
    'default': {
        'ENGINE':   'django.db.backends.mysql',
        'NAME':     MYSQL_DB,
        'USER':     MYSQL_USER,
        'PASSWORD': MYSQL_PASS,
        'HOST':     MYSQL_HOST,
        'PORT':     MYSQL_PORT,
    }
}
Beispiel #2
0
        'BACKEND': 'DjangoUeditor.saebackend',
        'DOMAIN': 'mushapi',
    }
else:
    # Settings on Local environment
    DOMAIN = 'http://localhost:8000'
    CACHES_BACKEND = 'django.core.cache.backends.memcached.MemcachedCache'
    if DEBUG:
        DB_HOST = 'localhost'
        DB_PORT = ''
        DB_USER = '******'
        DB_PASS = '******'
        DB_DB = 'selfblog'
    else:
        from sae._restful_mysql import monkey
        monkey.patch()

        DB_HOST = 'w.rdc.sae.sina.com.cn'
        DB_PORT = '3307'
        DB_USER = '******'
        DB_PASS = '******'
        DB_DB = 'app_mushapi'

# Datebase Setting
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': DB_DB,
        'USER': DB_USER,
        'PASSWORD': DB_PASS,
        'HOST': DB_HOST,
Beispiel #3
0
def patch_sae_restful_mysql():
    """ 用于直接操作线上的数据库
    """
    from sae._restful_mysql import monkey

    monkey.patch()
Beispiel #4
0
def patch_sae_restful_mysql():
    """ 用于直接操作线上的数据库
    """
    from sae._restful_mysql import monkey

    monkey.patch()