Advertisement
Guest User

Untitled

a guest
Mar 14th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. import os
  2.  
  3. from django.utils.translation import ugettext_lazy as _
  4.  
  5. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  6. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  7. PROJECT_PATH = os.path.dirname(os.path.realpath(__file__))
  8.  
  9. # Quick-start development settings - unsuitable for production
  10. # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
  11.  
  12. # SECURITY WARNING: keep the secret key used in production secret!
  13. SECRET_KEY = '************************************'
  14.  
  15. ADMINS = []
  16.  
  17. # Locale
  18.  
  19. LANGUAGES = (
  20. ('en', _('English')),
  21. ('es', _('Spanish')),
  22. )
  23.  
  24. LOCALE_PATHS = (
  25. os.path.join(BASE_DIR, 'locale'),
  26. )
  27.  
  28. # Application definition
  29.  
  30. INSTALLED_APPS = [
  31. 'django.contrib.admin',
  32. 'django.contrib.auth',
  33. 'django.contrib.contenttypes',
  34. 'django.contrib.sessions',
  35. 'django.contrib.messages',
  36. 'django.contrib.staticfiles',
  37. 'trackRacesGPS_app',
  38. 'compressor',
  39. 'django_countries',
  40. 'djmoney',
  41. 'bootstrap4',
  42. 'fa',
  43. 'widget_tweaks',
  44. ]
  45.  
  46. MIDDLEWARE = [
  47. 'django.middleware.security.SecurityMiddleware',
  48. # Deben tener este orden para que funcione las traducciones
  49. 'django.contrib.sessions.middleware.SessionMiddleware',
  50. 'django.middleware.locale.LocaleMiddleware',
  51. 'django.middleware.common.CommonMiddleware',
  52. 'django.middleware.csrf.CsrfViewMiddleware',
  53. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  54. 'django.contrib.messages.middleware.MessageMiddleware',
  55. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  56. 'django.middleware.http.ConditionalGetMiddleware',
  57. ]
  58.  
  59. ROOT_URLCONF = 'trackRacesGPS.urls'
  60.  
  61. WSGI_APPLICATION = 'trackRacesGPS.wsgi.application'
  62.  
  63. # Password validation
  64. # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
  65.  
  66. AUTH_PASSWORD_VALIDATORS = [
  67. {
  68. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  69. },
  70. {
  71. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  72. },
  73. {
  74. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  75. },
  76. {
  77. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  78. },
  79. ]
  80.  
  81. # Internationalization
  82. # https://docs.djangoproject.com/en/1.11/topics/i18n/
  83.  
  84. LANGUAGE_CODE = 'en-us'
  85. LANGUAGE_COOKIE_NAME = 'lang'
  86. TIME_ZONE = 'UTC'
  87. USE_I18N = True
  88. USE_L10N = True
  89. USE_TZ = True
  90.  
  91. # Static files (CSS, JavaScript, Images)
  92. # https://docs.djangoproject.com/en/1.11/howto/static-files/
  93.  
  94. STATIC_URL = '/static/'
  95. STATIC_ROOT = os.path.join(PROJECT_PATH, 'staticfiles')
  96. STATICFILES_DIRS = (
  97. os.path.join(PROJECT_PATH, 'static'),
  98. )
  99.  
  100. # File storage
  101. MEDIA_URL = '/media/'
  102. MEDIA_ROOT = (
  103. os.path.join(BASE_DIR, 'media')
  104. )
  105.  
  106. # Login static configuration
  107. LOGIN_REDIRECT_URL = "/"
  108. LOGIN_URL = '/login'
  109. LOGOUT_URL = '/'
  110.  
  111. # Simplified static file serving.
  112. # https://warehouse.python.org/project/whitenoise/
  113.  
  114. # STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
  115. AUTHENTICATION_BACKENDS = ('trackRacesGPS_app.backends.backend.EmailBackend',)
  116.  
  117. EMAIL_HOST = 'smtp.1and1.es'
  118. EMAIL_PORT = 587
  119. EMAIL_HOST_USER = ''
  120. EMAIL_HOST_PASSWORD = ''
  121. EMAIL_USE_TLS = True
  122. DEFAULT_FROM_EMAIL = ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement