Digital Rights Management für elektronische Patientenakten
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

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. """
  2. Django settings for Licenseserver project.
  3. Generated by 'django-admin startproject' using Django 3.1.4.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/3.1/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/3.1/ref/settings/
  8. """
  9. from pathlib import Path
  10. import os
  11. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  12. BASE_DIR = Path(__file__).resolve().parent.parent
  13. # Quick-start development settings - unsuitable for production
  14. # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
  15. # SECURITY WARNING: keep the secret key used in production secret!
  16. SECRET_KEY = '#^9h3-tg+(r__c)5m9@51#iq+f!e+ifr2&(q3y_3w=-9h2aizr'
  17. # SECURITY WARNING: don't run with debug turned on in production!
  18. DEBUG = True
  19. ALLOWED_HOSTS = ['192.168.192.69', '188.195.130.70', '0.0.0.0', 'localhost', '127.0.0.1']
  20. # Application definition
  21. INSTALLED_APPS = [
  22. 'django_crontab',
  23. 'django.contrib.admin',
  24. 'django.contrib.auth',
  25. 'django.contrib.contenttypes',
  26. 'django.contrib.sessions',
  27. 'django.contrib.messages',
  28. 'django.contrib.staticfiles',
  29. 'health_view'
  30. ]
  31. MIDDLEWARE = [
  32. 'django.middleware.security.SecurityMiddleware',
  33. 'django.contrib.sessions.middleware.SessionMiddleware',
  34. 'django.middleware.common.CommonMiddleware',
  35. 'django.middleware.csrf.CsrfViewMiddleware',
  36. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  37. 'django.contrib.messages.middleware.MessageMiddleware',
  38. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  39. ]
  40. ROOT_URLCONF = 'Licenseserver.urls'
  41. CRONJOBS = [
  42. ('*/1 * * * *', 'health_view.cron.check_exp_date', '>> /home/gabi/test.log')
  43. ]
  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 = 'Licenseserver.wsgi.application'
  60. # Database
  61. # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
  62. DATABASES = {
  63. 'default': {
  64. 'ENGINE': 'django.db.backends.sqlite3',
  65. 'NAME': BASE_DIR / 'db.sqlite3',
  66. }
  67. }
  68. # Password validation
  69. # https://docs.djangoproject.com/en/3.1/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/3.1/topics/i18n/
  86. LANGUAGE_CODE = 'en-us'
  87. TIME_ZONE = 'Europe/Berlin'
  88. USE_I18N = True
  89. USE_L10N = True
  90. USE_TZ = True
  91. # Static files (CSS, JavaScript, Images)
  92. # https://docs.djangoproject.com/en/3.1/howto/static-files/
  93. STATIC_URL = '/static/'
  94. LOGIN_REDIRECT_URL = '/'