No Description
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.

settings.py 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. """
  2. Django settings for dnmgmt project.
  3. Generated by 'django-admin startproject' using Django 1.10.5.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.10/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.10/ref/settings/
  8. """
  9. import os
  10. from django.contrib import messages
  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.10/howto/deployment/checklist/
  15. # SECURITY WARNING: keep the secret key used in production secret!
  16. SECRET_KEY = 'b96*sagnglcd8xe&8&cm6g-(onalk(ps3u!c1l3#_(-w64w35)'
  17. # SECURITY WARNING: don't run with debug turned on in production!
  18. DEBUG = True
  19. ALLOWED_HOSTS = []
  20. # Application definition
  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. 'crispy_forms',
  29. 'dncore',
  30. 'whoisdb',
  31. 'rrequests',
  32. 'domains',
  33. ]
  34. MIDDLEWARE = [
  35. 'django.middleware.security.SecurityMiddleware',
  36. 'django.contrib.sessions.middleware.SessionMiddleware',
  37. 'django.middleware.common.CommonMiddleware',
  38. 'django.middleware.csrf.CsrfViewMiddleware',
  39. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  40. 'django.contrib.messages.middleware.MessageMiddleware',
  41. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  42. ]
  43. ROOT_URLCONF = 'dnmgmt.urls'
  44. TEMPLATES = [
  45. {
  46. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  47. 'DIRS': [os.path.join(BASE_DIR, "templates/")],
  48. 'APP_DIRS': True,
  49. 'OPTIONS': {
  50. 'context_processors': [
  51. 'django.template.context_processors.debug',
  52. 'django.template.context_processors.request',
  53. 'django.contrib.auth.context_processors.auth',
  54. 'django.contrib.messages.context_processors.messages',
  55. ],
  56. },
  57. },
  58. ]
  59. WSGI_APPLICATION = 'dnmgmt.wsgi.application'
  60. # Database
  61. # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  62. DATABASES = {
  63. 'default': {
  64. 'ENGINE': 'django.db.backends.sqlite3',
  65. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  66. }
  67. }
  68. # Password validation
  69. # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
  70. AUTH_PASSWORD_VALIDATORS = [
  71. {
  72. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  73. },
  74. {
  75. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  76. },
  77. {
  78. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  79. },
  80. {
  81. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  82. },
  83. ]
  84. # Internationalization
  85. # https://docs.djangoproject.com/en/1.10/topics/i18n/
  86. LANGUAGE_CODE = 'en-us'
  87. TIME_ZONE = 'UTC'
  88. USE_I18N = True
  89. USE_L10N = True
  90. USE_TZ = True
  91. # Static files (CSS, JavaScript, Images)
  92. # https://docs.djangoproject.com/en/1.10/howto/static-files/
  93. STATIC_URL = '/static/'
  94. STATIC_ROOT = os.path.join(BASE_DIR, "cstatic")
  95. STATICFILES_DIRS = [
  96. os.path.join(BASE_DIR, "static"),
  97. ]
  98. CRISPY_TEMPLATE_PACK = 'bootstrap3'
  99. MESSAGE_TAGS = {
  100. messages.ERROR: 'danger',
  101. }
  102. AUTH_USER_MODEL = 'dncore.User'
  103. LOGIN_REDIRECT_URL = '/'
  104. LOGIN_URL = '/user/login/'