base.py 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. """
  2. Django settings for wifiwithme project.
  3. Generated by 'django-admin startproject' using Django 1.9.2.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.9/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.9/ref/settings/
  8. """
  9. import os
  10. import sys
  11. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  12. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  13. # Quick-start development settings - unsuitable for production
  14. # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
  15. # SECURITY WARNING: keep the secret key used in production secret!
  16. SECRET_KEY = 'e7#ho6q5-vjt58#elu#fyl^qzygvz=dkhv@fau96bfe+6kjipt'
  17. ALLOWED_HOSTS = []
  18. # Application definition
  19. # Add apps/ to the Python path
  20. sys.path = [os.path.join(BASE_DIR, 'apps')] + sys.path
  21. INSTALLED_APPS = [
  22. 'django.contrib.admin',
  23. 'django.contrib.auth',
  24. 'django.contrib.contenttypes',
  25. 'django.contrib.sessions',
  26. 'django.contrib.messages',
  27. 'django.contrib.staticfiles',
  28. 'contribmap',
  29. ]
  30. MIDDLEWARE_CLASSES = [
  31. 'django.middleware.security.SecurityMiddleware',
  32. 'django.contrib.sessions.middleware.SessionMiddleware',
  33. 'django.middleware.common.CommonMiddleware',
  34. 'django.middleware.csrf.CsrfViewMiddleware',
  35. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  36. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  37. 'django.contrib.messages.middleware.MessageMiddleware',
  38. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  39. ]
  40. ROOT_URLCONF = 'wifiwithme.core.urls'
  41. TEMPLATES = [
  42. {
  43. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  44. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  45. 'APP_DIRS': True,
  46. 'OPTIONS': {
  47. 'context_processors': [
  48. 'django.template.context_processors.debug',
  49. 'django.template.context_processors.request',
  50. 'django.contrib.auth.context_processors.auth',
  51. 'django.contrib.messages.context_processors.messages',
  52. ],
  53. },
  54. },
  55. ]
  56. WSGI_APPLICATION = 'wifiwithme.wsgi.application'
  57. # Database
  58. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  59. DATABASES = {
  60. 'default': {
  61. 'ENGINE': 'django.db.backends.sqlite3',
  62. 'NAME': os.path.join(os.path.dirname(BASE_DIR), 'db.sqlite3'),
  63. }
  64. }
  65. # Password validation
  66. # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  67. AUTH_PASSWORD_VALIDATORS = [
  68. {
  69. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  70. },
  71. {
  72. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  73. },
  74. {
  75. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  76. },
  77. {
  78. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  79. },
  80. ]
  81. # Internationalization
  82. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  83. LANGUAGE_CODE = 'en-us'
  84. TIME_ZONE = 'UTC'
  85. USE_I18N = True
  86. USE_L10N = True
  87. USE_TZ = True
  88. # Static files (CSS, JavaScript, Images)
  89. # https://docs.djangoproject.com/en/1.9/howto/static-files/
  90. STATIC_URL = '/static/'