Bug #33743
base.html TemplateDoesNotExist at /accounts/saml/login/
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
-
Début:
06 juin 2019
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Sur un Authentic configuré comme SP d'un IdP tiers, au retour du SAML :
Environment: Request Method: POST Request URL: https://connexion-parisnanterre.test.entrouvert.org/accounts/saml/login/ Django Version: 1.11.20 Python Version: 2.7.13 Installed Applications: '' Installed Middleware: '' Template loader postmortem Django tried loading these templates, in this order: Using engine django: * hobo.multitenant.template_loader.FilesystemLoader: /var/lib/authentic2-multitenant/tenants/connexion-parisnanterre.test.entrouvert.org/templates/variants/universite-paris-nanterre/base.html (Source does not exist) * hobo.multitenant.template_loader.FilesystemLoader: /var/lib/authentic2-multitenant/tenants/connexion-parisnanterre.test.entrouvert.org/theme/templates/variants/universite-paris-nanterre/base.html (Source does not exist) * hobo.multitenant.template_loader.FilesystemLoader: /var/lib/authentic2-multitenant/tenants/connexion-parisnanterre.test.entrouvert.org/templates/base.html (Source does not exist) * hobo.multitenant.template_loader.FilesystemLoader: /var/lib/authentic2-multitenant/tenants/connexion-parisnanterre.test.entrouvert.org/theme/templates/base.html (Source does not exist) * django.template.loaders.filesystem.Loader: /usr/lib/python2.7/dist-packages/authentic2/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/django/contrib/auth/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/django/contrib/admin/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/django_tables2/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2/saml/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2/idp/saml/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2/manager/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/gadjo/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/rest_framework/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2_auth_fc/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2_auth_oidc/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/mellon/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2_auth_saml/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2_idp_oidc/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2_idp_cas/templates/base.html (Source does not exist) * django.template.loaders.app_directories.Loader: /usr/lib/python2.7/dist-packages/authentic2/auth2_auth/auth2_ssl/templates/base.html (Source does not exist) Template error: In template /usr/lib/python2.7/dist-packages/mellon/templates/mellon/base.html, error at line 1 base.html 1 : {% extends "base.html" %} 2 : 3 : {% block extra_scripts %} 4 : {% block mellon_extra_scripts %} 5 : {% endblock %} 6 : {% endblock %} 7 : 8 : {% block content %} 9 : {% block mellon_content %} 10 : {% endblock %} 11 : {% endblock %} Traceback: File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _legacy_get_response 249. response = self._get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 58. return view_func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view 68. return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch 88. return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/mellon/views.py" in post 150. return self.sso_success(request, login) File "/usr/lib/python2.7/dist-packages/mellon/views.py" in sso_success 210. response = self.authenticate(request, login, attributes) File "/usr/lib/python2.7/dist-packages/mellon/views.py" in authenticate 236. {'saml_attributes': attributes}) File "/usr/lib/python2.7/dist-packages/django/shortcuts.py" in render 30. content = loader.render_to_string(template_name, context, request, using=using) File "/usr/lib/python2.7/dist-packages/django/template/loader.py" in render_to_string 68. return template.render(context, request) File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py" in render 68. reraise(exc, self.backend) File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py" in reraise 89. six.reraise(exc.__class__, new, sys.exc_info()[2]) File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py" in render 66. return self.template.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 207. return self._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 199. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 990. bit = node.render_annotated(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render_annotated 957. return self.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 177. return compiled_parent._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 199. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 990. bit = node.render_annotated(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render_annotated 957. return self.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 154. compiled_parent = self.get_parent(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in get_parent 151. return self.find_template(parent, context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in find_template 131. template_name, skip=history, File "/usr/lib/python2.7/dist-packages/django/template/engine.py" in find_template 148. raise TemplateDoesNotExist(name, tried=tried) Exception Type: TemplateDoesNotExist at /accounts/saml/login/ Exception Value: base.html
A voir si ce ticket est pour publik-base-theme, authentic ou mellon, je suis un peu perdu encore.
Fichiers
Révisions associées
Historique
Mis à jour par Thomas Noël il y a presque 5 ans
- Projet changé de Publik à Authentic 2
Ajouté un templates/mellon/base.html sur le tenant en cause :
{% extends "authentic2/base.html" %} {% block extrascripts %} {{ block.super }} {% block mellon_extra_scripts %} {% endblock %} {% endblock %} {% block content %} {% block mellon_content %} {% endblock %} {% endblock %}
Sans doute que ça devrait rejoindre Authentic, par exemple dans src/authentic2_auth_saml/templates/mellon/base.html ?
Mis à jour par Thomas Noël il y a presque 5 ans
- Fichier 0001-auth_saml-add-missing-mellon-base-template-33743.patch 0001-auth_saml-add-missing-mellon-base-template-33743.patch ajouté
- Tracker changé de Support à Bug
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a presque 5 ans
- Statut changé de Solution proposée à Solution validée
- Assigné à mis à Thomas Noël
Da, t'aurais eu un point de plus en ajoutant un test qui utiliserait ce template.
Mis à jour par Thomas Noël il y a presque 5 ans
- Statut changé de Solution validée à Résolu (à déployer)
- Assigné à
Thomas Noëlsupprimé
commit a083fb5367abbfd45f9a81bdbebd0c7abbe93c6a Author: Thomas NOEL <tnoel@entrouvert.com> Date: Thu Jun 6 12:07:00 2019 +0200 auth_saml: add missing mellon base template (#33743)
J'ai pensé à ajouter un test mais je n'ai pas trouvé de tests existants avec l'ui auth_saml alors j'ai pas été très courageux.
Mis à jour par Frédéric Péters il y a presque 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
auth_saml: add missing mellon base template (#33743)