|  | @ -1,19 +1,20 @@ | 
			
		
	
		
		
			
				
					|  |  | """ |  |  | """ | 
			
		
	
		
		
			
				
					|  |  | Django base settings for sigi project. |  |  | Django base settings for sigi project. | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  | Generated by 'django-admin startproject' using Django 4.0.1. |  |  | Generated by 'django-admin startproject' using Django 5.0.6. | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | For more information on this file, see |  |  | For more information on this file, see | 
			
		
	
		
		
			
				
					
					|  |  | https://docs.djangoproject.com/en/4.0/topics/settings/ |  |  | https://docs.djangoproject.com/en/5.0/topics/settings/ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | For the full list of settings and their values, see |  |  | For the full list of settings and their values, see | 
			
		
	
		
		
			
				
					
					|  |  | https://docs.djangoproject.com/en/4.0/ref/settings/ |  |  | https://docs.djangoproject.com/en/5.0/ref/settings/ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | """ |  |  | """ | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | import environ |  |  | import environ | 
			
		
	
		
		
			
				
					|  |  | from pathlib import Path |  |  | from pathlib import Path | 
			
		
	
		
		
			
				
					|  |  | from django.utils.translation import gettext_lazy as _ |  |  | from django.utils.translation import gettext_lazy as _ | 
			
		
	
		
		
			
				
					|  |  | from django.conf.locale.pt_BR import formats as br_formats |  |  | from django.conf.locale.pt_BR import formats as br_formats | 
			
		
	
		
		
			
				
					|  |  |  |  |  | from djbs import djbs_constants | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Build paths inside the project like this: BASE_DIR / 'subdir'. |  |  | # Build paths inside the project like this: BASE_DIR / 'subdir'. | 
			
		
	
	
		
		
			
				
					|  | @ -41,6 +42,22 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = 3000 | 
			
		
	
		
		
			
				
					|  |  | # Application definition |  |  | # Application definition | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | INSTALLED_APPS = [ |  |  | INSTALLED_APPS = [ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "djbs", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.forms", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.admin", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "admin_auto_filters", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.auth", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.contenttypes", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.sessions", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.messages", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.staticfiles", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django.contrib.sites", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django_extensions", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "django_filters", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "localflavor", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "import_export", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "tinymce", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     "rest_framework", | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.casas", |  |  |     "sigi.apps.casas", | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.contatos", |  |  |     "sigi.apps.contatos", | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.convenios", |  |  |     "sigi.apps.convenios", | 
			
		
	
	
		
		
			
				
					|  | @ -53,22 +70,6 @@ INSTALLED_APPS = [ | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.servicos", |  |  |     "sigi.apps.servicos", | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.servidores", |  |  |     "sigi.apps.servidores", | 
			
		
	
		
		
			
				
					|  |  |     "sigi.apps.utils", |  |  |     "sigi.apps.utils", | 
			
		
	
		
		
			
				
					|  |  |     "localflavor", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "import_export", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "tinymce", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.forms", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "rest_framework", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "material", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "material.admin", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "admin_auto_filters", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.auth", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.contenttypes", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.sessions", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.messages", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.staticfiles", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django.contrib.sites", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django_extensions", |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "django_filters", |  |  |  | 
			
		
	
		
		
			
				
					|  |  | ] |  |  | ] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | MIDDLEWARE = [ |  |  | MIDDLEWARE = [ | 
			
		
	
	
		
		
			
				
					|  | @ -107,7 +108,7 @@ DEFAULT_FROM_EMAIL = env( | 
			
		
	
		
		
			
				
					|  |  | SERVER_EMAIL = DEFAULT_FROM_EMAIL |  |  | SERVER_EMAIL = DEFAULT_FROM_EMAIL | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Database |  |  | # Database | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/ref/settings/#databases |  |  | # https://docs.djangoproject.com/en/5.0/ref/settings/#databases | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | DATABASES = { |  |  | DATABASES = { | 
			
		
	
		
		
			
				
					|  |  |     "default": env.db(), |  |  |     "default": env.db(), | 
			
		
	
	
		
		
			
				
					|  | @ -127,6 +128,7 @@ TEMPLATES = [ | 
			
		
	
		
		
			
				
					|  |  |                 "django.contrib.auth.context_processors.auth", |  |  |                 "django.contrib.auth.context_processors.auth", | 
			
		
	
		
		
			
				
					|  |  |                 "django.contrib.messages.context_processors.messages", |  |  |                 "django.contrib.messages.context_processors.messages", | 
			
		
	
		
		
			
				
					|  |  |                 "django.template.context_processors.media", |  |  |                 "django.template.context_processors.media", | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 "djbs.context_processors.sets", | 
			
		
	
		
		
			
				
					|  |  |                 "sigi.apps.utils.context_processors.site_context", |  |  |                 "sigi.apps.utils.context_processors.site_context", | 
			
		
	
		
		
			
				
					|  |  |                 "sigi.apps.home.context_processors.dashboard", |  |  |                 "sigi.apps.home.context_processors.dashboard", | 
			
		
	
		
		
			
				
					|  |  |             ], |  |  |             ], | 
			
		
	
	
		
		
			
				
					|  | @ -139,7 +141,7 @@ FORM_RENDERER = "django.forms.renderers.TemplatesSetting" | 
			
		
	
		
		
			
				
					|  |  | WSGI_APPLICATION = "sigi.wsgi.application" |  |  | WSGI_APPLICATION = "sigi.wsgi.application" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Internationalization |  |  | # Internationalization | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/topics/i18n/ |  |  | # https://docs.djangoproject.com/en/5.0/topics/i18n/ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | LANGUAGE_CODE = "pt-br" |  |  | LANGUAGE_CODE = "pt-br" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -154,7 +156,7 @@ USE_TZ = True | 
			
		
	
		
		
			
				
					|  |  | USE_THOUSAND_SEPARATOR = True |  |  | USE_THOUSAND_SEPARATOR = True | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Password validation |  |  | # Password validation | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators |  |  | # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | AUTH_PASSWORD_VALIDATORS = [ |  |  | AUTH_PASSWORD_VALIDATORS = [ | 
			
		
	
		
		
			
				
					|  |  |     { |  |  |     { | 
			
		
	
	
		
		
			
				
					|  | @ -214,7 +216,7 @@ LOGIN_REDIRECT_URL = "home_index" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Static files (CSS, JavaScript, Images) |  |  | # Static files (CSS, JavaScript, Images) | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/howto/static-files/ |  |  | # https://docs.djangoproject.com/en/5.0/howto/static-files/ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | STATIC_URL = "static/" |  |  | STATIC_URL = "static/" | 
			
		
	
		
		
			
				
					|  |  | STATICFILES_DIRS = [ |  |  | STATICFILES_DIRS = [ | 
			
		
	
	
		
		
			
				
					|  | @ -223,13 +225,13 @@ STATICFILES_DIRS = [ | 
			
		
	
		
		
			
				
					|  |  | STATIC_ROOT = BASE_DIR / "../static/" |  |  | STATIC_ROOT = BASE_DIR / "../static/" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Media files |  |  | # Media files | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/topics/files/#managing-files |  |  | # https://docs.djangoproject.com/en/5.0/topics/files/#managing-files | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | MEDIA_ROOT = BASE_DIR / "../media" |  |  | MEDIA_ROOT = BASE_DIR / "../media" | 
			
		
	
		
		
			
				
					|  |  | MEDIA_URL = "media/" |  |  | MEDIA_URL = "media/" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Default primary key field type |  |  | # Default primary key field type | 
			
		
	
		
		
			
				
					
					|  |  | # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field |  |  | # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |  |  | DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -243,20 +245,18 @@ IMPORT_EXPORT_SKIP_ADMIN_LOG = True | 
			
		
	
		
		
			
				
					|  |  | br_formats.DATE_FORMAT = br_formats.SHORT_DATE_FORMAT |  |  | br_formats.DATE_FORMAT = br_formats.SHORT_DATE_FORMAT | 
			
		
	
		
		
			
				
					|  |  | br_formats.DATETIME_FORMAT = br_formats.SHORT_DATETIME_FORMAT |  |  | br_formats.DATETIME_FORMAT = br_formats.SHORT_DATETIME_FORMAT | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  | # Django Material Admin settings |  |  | # djbs-theme settings - Django Bootstrap Theme | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | # https://github.com/MaistrenkoAnton/django-material-admin#django-material-administration |  |  | # https://github.com/interlegis/djbs-theme/?tab=readme-ov-file#customizing | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | MATERIAL_ADMIN_SITE = { |  |  | DJBSTHEME_DEFAULTS = { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "HEADER": _("SIGI - Sistema de Informações do Interlegis"), |  |  |     "SEARCH_URL": None, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "TITLE": _("SIGI"), |  |  |     "SEARCH_PARAM": None, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "FAVICON": "img/favicon.ico", |  |  |     "MENU_FILE": BASE_DIR / "menu_conf.yaml", | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "PROFILE_PICTURE": "img/interlegis.jpeg",  # Admin site profile picture (path to static should be specified) |  |  |     "CHECK_AS_SWITCH": True, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "PROFILE_BG": "img/engitec.jpeg",  # Admin site profile background (path to static should be specified) |  |  |     "FILTER_STYLE": djbs_constants.FILTER_STYLE_CLASSIC, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "LOGIN_LOGO": "img/interlegis.jpeg",  # Admin site logo on login page (path to static should be specified) |  |  |     "FIELDSET_STYLE": djbs_constants.STYLE_CARD, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "LOGOUT_BG": "img/engitec.jpeg",  # Admin site background on login/logout pages (path to static should be specified) |  |  |     "INLINESET_STYLE": djbs_constants.STYLE_CARD, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |     "SHOW_THEMES": False,  #  Show default admin themes button |  |  |     "BADGERIZE_FACETS": True, | 
			
				
				
			
		
	
		
		
			
				
					|  |  |     "TRAY_REVERSE": False,  # Hide object-tools and additional-submit-line by default |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     "NAVBAR_REVERSE": False,  # Hide side navbar by default |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | } |  |  | } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # tinyMCE rich text editor settings |  |  | # tinyMCE rich text editor settings | 
			
		
	
	
		
		
			
				
					|  | 
 |