changeset 1c677bcc32a7 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=1c677bcc32a7
description:
        Do not construct url for static endpoint

        When layout is rendered for static endpoint, it is because the resource 
is not
        found. So url_for will fail to construct the hash for flask_rev.
diffstat:

 templates/layout.html |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 9fe283073d72 -r 1c677bcc32a7 templates/layout.html
--- a/templates/layout.html     Wed Jul 10 11:34:28 2019 +0200
+++ b/templates/layout.html     Wed Jul 10 16:07:25 2019 +0200
@@ -8,7 +8,7 @@
         <meta name="author" content="Tryton"/>
         <meta property="og:title" content="{{ title }}"/>
         <meta property="og:type" content="website"/>
-        {% if request.endpoint %}
+        {% if request.endpoint and request.endpoint != 'static' %}
         <meta property="og:url" content="{{ url_for(request.endpoint, 
_external=True, **request.view_args) }}"/>
         {% else %}
         <meta property="og:url" content="{{ request.url }}"/>

Reply via email to