|
| 1 | +""" |
| 2 | +Settings for the documentation builder. |
| 3 | +""" |
| 4 | + |
| 5 | +import os |
| 6 | + |
| 7 | +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
| 8 | +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 9 | + |
| 10 | +# Quick-start development settings - unsuitable for production |
| 11 | +# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ |
| 12 | + |
| 13 | +# SECURITY WARNING: keep the secret key used in production secret! |
| 14 | +SECRET_KEY = "1han1v%@fd0#e40#tm0z!g2twgo3+!gf9-kr3--1v5)_bkfv4q" |
| 15 | + |
| 16 | +# SECURITY WARNING: don't run with debug turned on in production! |
| 17 | +DEBUG = True |
| 18 | + |
| 19 | +ALLOWED_HOSTS = ["*"] |
| 20 | + |
| 21 | +# Application definition |
| 22 | + |
| 23 | +INSTALLED_APPS = [ |
| 24 | + "django.contrib.auth", |
| 25 | + "django.contrib.contenttypes", |
| 26 | + "django.contrib.sessions", |
| 27 | + "django.contrib.messages", |
| 28 | + "django.contrib.staticfiles", |
| 29 | + "crequest", |
| 30 | + "crispy_forms", |
| 31 | + "reversion", |
| 32 | + "tabular_permissions", |
| 33 | + "erp_framework", |
| 34 | + # "erp_framework.admin", |
| 35 | + # "erp_framework.activity", |
| 36 | + "erp_framework.reporting", |
| 37 | + "slick_reporting", |
| 38 | + "jazzmin", |
| 39 | + "django.contrib.admin", |
| 40 | +] |
| 41 | + |
| 42 | +MIDDLEWARE = [ |
| 43 | + "django.middleware.security.SecurityMiddleware", |
| 44 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 45 | + "django.middleware.common.CommonMiddleware", |
| 46 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 47 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 48 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 49 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
| 50 | + "crequest.middleware.CrequestMiddleware", |
| 51 | +] |
| 52 | + |
| 53 | +ROOT_URLCONF = "myproject.urls" |
| 54 | + |
| 55 | +TEMPLATES = [ |
| 56 | + { |
| 57 | + "BACKEND": "django.template.backends.django.DjangoTemplates", |
| 58 | + "DIRS": [], |
| 59 | + "APP_DIRS": True, |
| 60 | + "OPTIONS": { |
| 61 | + "context_processors": [ |
| 62 | + "django.template.context_processors.debug", |
| 63 | + "django.template.context_processors.request", |
| 64 | + "django.contrib.auth.context_processors.auth", |
| 65 | + "django.contrib.messages.context_processors.messages", |
| 66 | + "django.template.context_processors.i18n", |
| 67 | + "django.template.context_processors.static", |
| 68 | + ], |
| 69 | + }, |
| 70 | + }, |
| 71 | +] |
| 72 | + |
| 73 | +WSGI_APPLICATION = "myproject.wsgi.application" |
| 74 | + |
| 75 | +# Password validation |
| 76 | +# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators |
| 77 | + |
| 78 | +AUTH_PASSWORD_VALIDATORS = [ |
| 79 | + { |
| 80 | + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", |
| 81 | + }, |
| 82 | + { |
| 83 | + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
| 84 | + }, |
| 85 | + { |
| 86 | + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
| 87 | + }, |
| 88 | + { |
| 89 | + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
| 90 | + }, |
| 91 | +] |
| 92 | + |
| 93 | +# Internationalization |
| 94 | +# https://docs.djangoproject.com/en/2.2/topics/i18n/ |
| 95 | + |
| 96 | +LANGUAGE_CODE = "en-us" |
| 97 | + |
| 98 | +TIME_ZONE = "UTC" |
| 99 | + |
| 100 | +USE_I18N = True |
| 101 | + |
| 102 | +USE_L10N = True |
| 103 | + |
| 104 | +USE_TZ = True |
| 105 | + |
| 106 | +# Static files (CSS, JavaScript, Images) |
| 107 | +# https://docs.djangoproject.com/en/2.2/howto/static-files/ |
| 108 | + |
| 109 | +STATIC_URL = "/static/" |
| 110 | + |
| 111 | +# Database |
| 112 | +# https://docs.djangoproject.com/en/2.2/ref/settings/#databases |
| 113 | + |
| 114 | + |
| 115 | +STATIC_ROOT = os.path.join(BASE_DIR, "..", "collected_static") |
| 116 | +CRISPY_TEMPLATE_PACK = "bootstrap4" |
| 117 | + |
| 118 | +LOGIN_REDIRECT_URL = "/" |
| 119 | + |
| 120 | +# RA_ADMIN_INDEX_PAGE = 'ra_demo/index.html' |
| 121 | + |
| 122 | +ERP_ADMIN_SITE_TITLE = "my demo " |
| 123 | + |
| 124 | +DATABASES = { |
| 125 | + "default": { |
| 126 | + "ENGINE": "django.db.backends.sqlite3", |
| 127 | + "NAME": os.path.join(BASE_DIR, "erp_framework.sqlite3"), |
| 128 | + } |
| 129 | +} |
0 commit comments