|
15 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. |
16 | 16 | BASE_DIR = Path(__file__).resolve().parent.parent |
17 | 17 |
|
18 | | - |
19 | 18 | # Quick-start development settings - unsuitable for production |
20 | 19 | # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ |
21 | 20 |
|
22 | 21 | # SECURITY WARNING: keep the secret key used in production secret! |
23 | 22 | SECRET_KEY = 'django-insecure-k6k-x^q$jjp*@bs#_7yw-!&cyn4g^byvr*lseiok=h=t#!)bw4' |
24 | 23 | ENCRYPT_KEY = b'Py6zhVP-eFxkfq0kHUN0ZmIePwwaOeQ12ZmrFAVLbI8=' |
| 24 | + |
25 | 25 | # SECURITY WARNING: don't run with debug turned on in production! |
26 | 26 | DEBUG = True |
27 | 27 |
|
|
31 | 31 | # Application definition |
32 | 32 |
|
33 | 33 | INSTALLED_APPS = [ |
34 | | - 'jazzmin', |
| 34 | + 'jazzmin', #Package used to customize the Django Admin Panel |
35 | 35 | 'django.contrib.admin', |
36 | 36 | 'django.contrib.auth', |
37 | 37 | 'django.contrib.contenttypes', |
|
45 | 45 | 'import_export', |
46 | 46 | 'django_cleanup.apps.CleanupConfig', |
47 | 47 | ] |
48 | | -IMPORT_EXPORT_USE_TRANSACTIONS = True |
| 48 | +IMPORT_EXPORT_USE_TRANSACTIONS = True #Mandatory for Transactions perfomred with import_export package |
49 | 49 | CRISPY_TEMPLATE_PACK = 'bootstrap4' |
50 | 50 |
|
51 | 51 | MIDDLEWARE = [ |
|
126 | 126 |
|
127 | 127 | STATIC_URL = 'static/' |
128 | 128 | STATICFILES_DIRS = [BASE_DIR / 'static'] |
| 129 | + |
| 130 | +# Media Files (Images, Files...), This files are stored with associate with databse |
129 | 131 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') |
130 | 132 | MEDIA_URL = '/media/' |
131 | 133 |
|
|
134 | 136 |
|
135 | 137 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' |
136 | 138 |
|
| 139 | +###### Message Rendering tags ###### |
137 | 140 | from django.contrib.messages import constants as messages |
138 | 141 | MESSAGE_TAGS = { |
139 | | - messages.DEBUG: 'alert-secondary', |
140 | | - messages.INFO: 'alert-info', |
141 | | - messages.SUCCESS: 'alert-success', |
142 | | - messages.WARNING: 'alert-warning', |
143 | | - messages.ERROR: 'alert-danger', |
| 142 | + messages.DEBUG: 'alert-secondary', |
| 143 | + messages.INFO: 'alert-info', |
| 144 | + messages.SUCCESS: 'alert-success', |
| 145 | + messages.WARNING: 'alert-warning', |
| 146 | + messages.ERROR: 'alert-danger', |
144 | 147 | } |
145 | 148 |
|
146 | 149 | #### Email Intergration ### |
|
151 | 154 | EMAIL_HOST_PASSWORD = 'password' #You should type your Email password |
152 | 155 | EMAIL_USE_TLS = True |
153 | 156 |
|
154 | | -LOGIN_REDIRECT_URL = 'home' |
155 | | -LOGOUT_REDIRECT_URL = 'login' |
| 157 | +LOGIN_REDIRECT_URL = 'home' #this Url is used to redirect Users after login |
| 158 | +LOGOUT_REDIRECT_URL = 'login' #this Url is used to redirect Users after logout |
156 | 159 |
|
157 | 160 | ###################### ADMIN DASHBOARD OVERWRITE ###################### |
158 | 161 | JAZZMIN_SETTINGS = { |
|
0 commit comments