0

I have an image in the default folder of views as an example in the below link (http://127.0.0.1:8000/cooking_recipes/default/images/nav-logo.png) and even some scripts in the same folder.that is because I am using ready-made template for my website.So how coould I say web2py that those are just images and scripts and not html views? I found that web2py is treating them as views and giving back a html page with the source code view-source:http://127.0.0.1:8000/cooking_recipes/default/images/nav-logo.png

<html><body><h1>invalid function (default/images)</h1></body></html>
radha
  • 47
  • 1
  • 6

1 Answers1

0

Static assets should go in the application's /static folder (you might want to put images in /static/images and scripts in /static/js). You would then use the URL() helper to generate URLs:

URL('static', 'images/nav-logo.png')
Anthony
  • 25,466
  • 3
  • 28
  • 57