adiciona o buscador e cria views e templates para ele

This commit is contained in:
root
2025-03-07 15:31:53 +01:00
parent 1cd93f7955
commit 3f5ac79051
18 changed files with 378 additions and 235 deletions

View File

@ -83,7 +83,7 @@ THIRD_PARTY_APPS = [
LOCAL_APPS = [
"diários_oficiais_alems.users",
"diarios",
'django_elasticsearch_dsl',
"django_elasticsearch_dsl",
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
@ -278,7 +278,9 @@ ACCOUNT_FORMS = {"signup": "diários_oficiais_alems.users.forms.UserSignupForm"}
# https://docs.allauth.org/en/latest/socialaccount/configuration.html
SOCIALACCOUNT_ADAPTER = "diários_oficiais_alems.users.adapters.SocialAccountAdapter"
# https://docs.allauth.org/en/latest/socialaccount/configuration.html
SOCIALACCOUNT_FORMS = {"signup": "diários_oficiais_alems.users.forms.UserSocialSignupForm"}
SOCIALACCOUNT_FORMS = {
"signup": "diários_oficiais_alems.users.forms.UserSocialSignupForm"
}
# django-compressor
# ------------------------------------------------------------------------------
# https://django-compressor.readthedocs.io/en/latest/quickstart/#installation
@ -288,8 +290,6 @@ STATICFILES_FINDERS += ["compressor.finders.CompressorFinder"]
# Elastic Search
# ------------------------------------------------------------------------------
ELASTICSEARCH_DSL = {
'default': {
'hosts': 'http://elasticsearch:9200' # same as above
},
"default": {"hosts": "http://elasticsearch:9200"}, # same as above
}
ELASTICSEARCH_HOSTS="http://elasticsearch:9200"
ELASTICSEARCH_HOSTS = "http://elasticsearch:9200"

View File

@ -30,7 +30,8 @@ CACHES = {
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = env(
"DJANGO_EMAIL_BACKEND", default="django.core.mail.backends.console.EmailBackend",
"DJANGO_EMAIL_BACKEND",
default="django.core.mail.backends.console.EmailBackend",
)
# WhiteNoise
@ -66,7 +67,7 @@ if env("USE_DOCKER") == "yes":
# ------------------------------------------------------------------------------
# This is a custom setting for RunServerPlus to fix reloader issue in Windows docker environment
# Werkzeug reloader type [auto, watchdog, or stat]
RUNSERVERPLUS_POLLER_RELOADER_TYPE = 'stat'
RUNSERVERPLUS_POLLER_RELOADER_TYPE = "stat"
# If you have CPU and IO load issues, you can increase this poller interval e.g) 5
RUNSERVERPLUS_POLLER_RELOADER_INTERVAL = 1

View File

@ -20,7 +20,7 @@ urlpatterns = [
path("users/", include("diários_oficiais_alems.users.urls", namespace="users")),
path("accounts/", include("allauth.urls")),
# Your stuff: custom urls includes go here
path("diarios/", include("diarios.urls")),
path("diarios/", include("diarios.urls")),
# Media files
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
]