diff --git a/apps/courses/context_processors.py b/apps/courses/context_processors.py new file mode 100644 index 0000000..54891c3 --- /dev/null +++ b/apps/courses/context_processors.py @@ -0,0 +1,12 @@ +DESCRIPTION = ( + "Buscador de ramos para la Universidad Católica, " + "ideal para planificar tu horario y encontrar electivos. " + "Una alternativa a Buscacursos UC." +) + +IMG_PATH = "/dist/favicon.ico" + + +def defaults(_request): + "Loads the default template variables" + return {"fallback_description": DESCRIPTION, "fallback_img_path": IMG_PATH} diff --git a/front/templates/base.html b/front/templates/base.html index a6fe8de..6ec4c76 100644 --- a/front/templates/base.html +++ b/front/templates/base.html @@ -5,7 +5,16 @@ - {% block title %}{% endblock %} - RamosUC + + {% if page_title %}{{ page_title }} - {% endif %}RamosUC + + + + + + + + {% if GA_CODE %} diff --git a/ramosuc/settings.py b/ramosuc/settings.py index 9ad7935..7bd7502 100644 --- a/ramosuc/settings.py +++ b/ramosuc/settings.py @@ -70,6 +70,7 @@ "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", "apps.google_analytics.context_processors.ga_code", + "apps.courses.context_processors.defaults", ], }, },