1. Mike Orr
  2. Akhet
Issue #9 open

problem with url.app in templates

Anonymous created an issue

The default site template (site.html), generated by akhet, has something like:

href="${url.app}stylesheets/default.css"

${url.app} always returns the relative path of the request. Something like /my_handler/my_action (if it's not at the root of the website) As a result the above url becomes /my_handler/my_actionstylesheets/default.css I think this is something nobody would want in their site template.

Comments (4)

  1. Marcin Lulek
    • changed status to open

    this is still broken in trunk - tested few minutes ago.

    map /foo/bar/baz/test to main handler and url for staticly served css gets broken.

    the template needs to be updated to:

    <link rel="shortcut icon" href="${url.app}/favicon.ico" /> <link rel="stylesheet" href="${url.app}/stylesheets/default.css" type="text/css" media="screen" charset="utf-8" />

    and

    <img src="${url.app}/images/pyramid-negative.png" alt="" />

  2. Anonymous

    the same problem here, handler:

    config.add_handler('my_test_handler', "foo/bar/baz/test", "akhet_test.handlers.main:Main", action='index')
    

    and url:

    http://127.0.0.1:5000/foo/bar/baz/test
    

    producing broken static paths:

    <link rel="shortcut icon" href="favicon.ico" /> 
    <link rel="stylesheet" href="stylesheets/default.css" type="text/css" media="screen" charset="utf-8" /> 
    
  3. Log in to comment