Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Django settings for bikepurranque project.
- For more information on this file, see
- https://docs.djangoproject.com/en/1.7/topics/settings/
- For the full list of settings and their values, see
- https://docs.djangoproject.com/en/1.7/ref/settings/
- """
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- import os
- #si se comenta crashea heroku
- BASE_DIR = os.path.dirname(os.path.dirname(__file__))
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = 'p$a#mo2!&$97cg9m^%di_uvue2g8qdf*-v#v189x3jigybk%@l'
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = True
- TEMPLATE_DEBUG = True
- ALLOWED_HOSTS = []
- # Application definition
- INSTALLED_APPS = (
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'rutasQr',
- 'rest_framework',
- 'competencias',
- 'noticias',
- #'django_admin_bootstrapped.bootstrap3',
- #'django_admin_bootstrapped',
- 'ckeditor',
- 'social.apps.django_app.default',
- 'bootstrap_admin',
- 'django.contrib.admin',
- # 'latch',
- )
- MIDDLEWARE_CLASSES = (
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- )
- ROOT_URLCONF = 'bikepurranque.urls'
- WSGI_APPLICATION = 'bikepurranque.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
- # Internationalization
- # https://docs.djangoproject.com/en/1.7/topics/i18n/
- LANGUAGE_CODE = 'es-cl'
- TIME_ZONE = 'Chile/Continental'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- TEMPLATE_DIRS = (
- os.path.join(BASE_DIR, 'templates'),
- #BASE_DIR + "/templates/",
- )
- MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
- CKEDITOR_UPLOAD_PATH = 'http://127.0.0.1:8000/media/' + 'content/ckeditor/'
- """CKEDITOR_CONFIGS = {
- 'default': { 'toolbar': None, },
- }"""
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.7/howto/static-files/
- STATIC_URL = '/static/'
- STATICFILES_DIRS = (
- os.path.join((BASE_DIR), "static"),
- )
- #login social
- AUTHENTICATION_BACKENDS = (
- 'social.backends.facebook.FacebookAppOAuth2',
- 'social.backends.facebook.FacebookOAuth2',
- 'social.backends.twitter.TwitterOAuth',
- #Login normal de django user/password
- 'django.contrib.auth.backends.ModelBackend',
- )
- #a que url redirrecciona una vez logeado. inicio
- SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
- SOCIAL_AUTH_FACEBOOK_KEY = ''
- SOCIAL_AUTH_FACEBOOK_SECRET = ''
- SOCIAL_AUTH_TWITTER_KEY = ''
- SOCIAL_AUTH_TWITTER_SECRET = ''
- # For Sidebar Menu in Django 1.7 only (List of apps and models) (RECOMMENDED)
- from django.conf import global_settings
- TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
- 'django.core.context_processors.request',
- )
- BOOTSTRAP_ADMIN_SIDEBAR_MENU = True
- # Anadir el modelo de usuario en settings.py
- #AUTH_PROFILE_MODULE='latch.UserProfile'
- # Establecer el backend de autenticacion
- #AUTHENTICATION_BACKENDS = (
- #'latch.auth_backend.LatchAuthBackend',
- #)
- #heroku
- #COMENTAR PARA EJECUTAR EN LOCAL, DESCOMENTAR PARA HEROKU
- # Parse database configuration from $DATABASE_URL
- import dj_database_url
- DATABASES['default'] = dj_database_url.config()
- # Honor the 'X-Forwarded-Proto' header for request.is_secure()
- SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
- # Allow all host headers
- ALLOWED_HOSTS = ['*']
- # Static asset configuration
- import os
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
- STATIC_ROOT = 'staticfiles'
- STATIC_URL = '/static/'
- STATICFILES_DIRS = (
- #local
- #os.path.join(BASE_DIR, 'static'),
- #heroku
- #os.path.join('static'),
- )
- # Simplified static file serving.
- # https://warehouse.python.org/project/whitenoise/
- STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement