# -*- encoding: utf-8 -*- """ Django settings for xxx project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) #import os #PROJECT_ROOT = os.path.dirname('settings.py') #BASE_DIR = os.path.dirname(os.path.dirname(__file__)) import os PROJECT_ROOT = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'cbmbxeqxxzml)hl-zmntci5un!tzisns@-*upg+8*o%k&i79e5' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'encuesta', 'rest_framework', ) SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'xxx.urls' WSGI_APPLICATION = 'xxx.wsgi.application' # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'encuestas_dif', 'USER': 'postgres', 'PASSWORD': 'gob2015_S4.general', 'HOST': 'bdpro.tabasco.gob.mx', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. 'PORT': '5444', } } # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ LANGUAGE_CODE = 'es-Mx' TIME_ZONE = 'America/Mexico_City' USE_I18N = True USE_L10N = True USE_TZ = True MEDIA_ROOT = '/opt/public_html/sistema-de-encuesta/media/' MEDIA_URL = '/media/' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_ROOT = PROJECT_ROOT + '/static/' STATIC_URL = 'http://template.tabasco.gob.mx/' STATICFILES_DIRS = ( os.path.join(os.path.dirname(__file__),'../static'), ) TEMPLATE_DIRS = ( os.path.join(PROJECT_ROOT, 'templates'), ) LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' } }, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' } }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True, }, } } JASPERSERVER = 'http://10.2.8.36/jasperserver/services/repository?wsdl'