Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

defaults.py 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. """
  2. Django settings for Lodel project.
  3. For more information on this file, see
  4. https://docs.djangoproject.com/en/1.7/topics/settings/
  5. For the full list of settings and their values, see
  6. https://docs.djangoproject.com/en/1.7/ref/settings/
  7. """
  8. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  9. import os
  10. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  11. # Quick-start development settings - unsuitable for production
  12. # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
  13. # SECURITY WARNING: keep the secret key used in production secret!
  14. SECRET_KEY = 'b43in=yebf(b7)77n^wwe&jp2m7*krco)+vz48&_%-wtd(8x-$'
  15. # SECURITY WARNING: don't run with debug turned on in production!
  16. DEBUG = True
  17. TEMPLATE_DEBUG = True
  18. ALLOWED_HOSTS = []
  19. LOGGING = {
  20. 'version': 1,
  21. 'disable_existing_loggers': False,
  22. 'formatters': {
  23. 'verbose': {
  24. 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s',
  25. },
  26. 'simple': {
  27. 'format': '%(levelname)s %(module)s %(funcName)s %(message)s',
  28. },
  29. },
  30. 'handlers': {
  31. 'console': {
  32. 'class': 'logging.StreamHandler',
  33. 'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
  34. 'formatter': 'simple',
  35. },
  36. },
  37. 'loggers': {
  38. 'django': {
  39. 'handlers': ['console'],
  40. 'propagate': True,
  41. 'level': 'DEBUG',
  42. },
  43. 'Lodel2.database': {
  44. 'handlers': ['console'],
  45. 'level': 'DEBUG',
  46. 'propagate': True,
  47. },
  48. 'EditorialModel' : {
  49. 'handlers': ['console'],
  50. 'propagate': True,
  51. 'level': 'DEBUG',
  52. },
  53. },
  54. }
  55. # Application definition
  56. INSTALLED_APPS = (
  57. 'django.contrib.admin',
  58. 'django.contrib.auth',
  59. 'django.contrib.contenttypes',
  60. 'django.contrib.sessions',
  61. 'django.contrib.messages',
  62. 'django.contrib.staticfiles',
  63. 'LodelTestInstance',
  64. 'Lodel',
  65. )
  66. MIDDLEWARE_CLASSES = (
  67. 'django.contrib.sessions.middleware.SessionMiddleware',
  68. 'django.middleware.common.CommonMiddleware',
  69. 'django.middleware.csrf.CsrfViewMiddleware',
  70. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  71. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  72. 'django.contrib.messages.middleware.MessageMiddleware',
  73. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  74. )
  75. ROOT_URLCONF = 'Lodel.urls'
  76. WSGI_APPLICATION = 'Lodel.wsgi.application'
  77. # Database
  78. # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
  79. DATABASES = {
  80. 'default': {
  81. 'ENGINE': 'django.db.backends.mysql',
  82. 'NAME': 'lodel2',
  83. 'USER': 'lodel',
  84. 'PASSWORD': 'bruno',
  85. 'HOST': 'localhost',
  86. }
  87. }
  88. """
  89. DATABASES = {
  90. 'default': {
  91. 'ENGINE': 'django.db.backends.sqlite3',
  92. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  93. }
  94. }
  95. """
  96. # Internationalization
  97. # https://docs.djangoproject.com/en/1.7/topics/i18n/
  98. LANGUAGE_CODE = 'en-us'
  99. TIME_ZONE = 'UTC'
  100. USE_I18N = True
  101. USE_L10N = True
  102. USE_TZ = True
  103. # Static files (CSS, JavaScript, Images)
  104. # https://docs.djangoproject.com/en/1.7/howto/static-files/
  105. STATIC_URL = '/static/'
  106. # Lodel configurations
  107. LODEL_MIGRATION_HANDLER_TESTS = False