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.3KB

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