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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # This file is part of dnmgmt, a number resource management system
  2. # Licensed under GNU General Public License v3 or later
  3. # Written by Sebastian Lohff (seba@someserver.de)
  4. """
  5. Django settings for dnmgmt project.
  6. Generated by 'django-admin startproject' using Django 1.10.5.
  7. For more information on this file, see
  8. https://docs.djangoproject.com/en/1.10/topics/settings/
  9. For the full list of settings and their values, see
  10. https://docs.djangoproject.com/en/1.10/ref/settings/
  11. """
  12. import os
  13. from django.contrib import messages
  14. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  15. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  16. TLD_NAMESERVERS = [
  17. '10.100.100.100',
  18. ]
  19. DATETIME_FORMAT = "Y-m-d H:i:s"
  20. DATE_FORMAT = "Y-m-d"
  21. # Quick-start development settings - unsuitable for production
  22. # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
  23. # SECURITY WARNING: keep the secret key used in production secret!
  24. SECRET_KEY = 'b96*sagnglcd8xe&8&cm6g-(onalk(ps3u!c1l3#_(-w64w35)'
  25. # SECURITY WARNING: don't run with debug turned on in production!
  26. DEBUG = True
  27. ALLOWED_HOSTS = ["*"]
  28. # Application definition
  29. INSTALLED_APPS = [
  30. 'django.contrib.admin',
  31. 'django.contrib.auth',
  32. 'django.contrib.contenttypes',
  33. 'django.contrib.sessions',
  34. 'django.contrib.messages',
  35. 'django.contrib.staticfiles',
  36. 'crispy_forms',
  37. 'formtools',
  38. 'dncore',
  39. 'whoisdb',
  40. 'rrequests',
  41. 'domains',
  42. 'api',
  43. ]
  44. MIDDLEWARE = [
  45. 'django.middleware.security.SecurityMiddleware',
  46. 'django.contrib.sessions.middleware.SessionMiddleware',
  47. 'django.middleware.common.CommonMiddleware',
  48. 'django.middleware.csrf.CsrfViewMiddleware',
  49. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  50. 'django.contrib.messages.middleware.MessageMiddleware',
  51. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  52. ]
  53. ROOT_URLCONF = 'dnmgmt.urls'
  54. TEMPLATES = [
  55. {
  56. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  57. 'DIRS': [os.path.join(BASE_DIR, "templates/")],
  58. 'APP_DIRS': True,
  59. 'OPTIONS': {
  60. 'context_processors': [
  61. 'django.template.context_processors.debug',
  62. 'django.template.context_processors.request',
  63. 'django.contrib.auth.context_processors.auth',
  64. 'django.contrib.messages.context_processors.messages',
  65. ],
  66. },
  67. },
  68. ]
  69. WSGI_APPLICATION = 'dnmgmt.wsgi.application'
  70. # Database
  71. # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  72. DATABASES = {
  73. 'default': {
  74. 'ENGINE': 'django.db.backends.sqlite3',
  75. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  76. }
  77. }
  78. # Password validation
  79. # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
  80. AUTH_PASSWORD_VALIDATORS = [
  81. {
  82. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  83. },
  84. {
  85. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  86. },
  87. {
  88. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  89. },
  90. {
  91. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  92. },
  93. ]
  94. # Internationalization
  95. # https://docs.djangoproject.com/en/1.10/topics/i18n/
  96. LANGUAGE_CODE = 'en-gb'
  97. #TIME_ZONE = 'UTC'
  98. TIME_ZONE = 'Europe/Berlin'
  99. USE_I18N = False
  100. USE_L10N = False
  101. USE_TZ = True
  102. # Static files (CSS, JavaScript, Images)
  103. # https://docs.djangoproject.com/en/1.10/howto/static-files/
  104. STATIC_URL = '/static/'
  105. STATIC_ROOT = os.path.join(BASE_DIR, "cstatic")
  106. STATICFILES_DIRS = [
  107. os.path.join(BASE_DIR, "static"),
  108. ]
  109. CRISPY_TEMPLATE_PACK = 'bootstrap3'
  110. MESSAGE_TAGS = {
  111. messages.ERROR: 'danger',
  112. }
  113. AUTH_USER_MODEL = 'dncore.User'
  114. LOGIN_REDIRECT_URL = '/'
  115. LOGIN_URL = '/user/login/'