On Tuesday, April 26, 2011 10:03:20 PM UTC-4, Pystar wrote:
>
> If you try to mix and match these two methods in your layouts:
> i.e.
> <link rel="stylesheet" type="text/css" href="css/blablah.css"/>
> and
> {{response.files.append(URL('static','css/blahblah.css'))}}
>
> I found out that some of my files i.e. CSS in this case where not
> being imported and applied to the layout. Till I choose a uniform
> method to import files to my layout. This behavior is somewhat
> strange and gave me a lot of troubles before figuring it out.
Note, response.files.append does not directly insert a link to the file in
your view. Rather, it simply adds the file to the response.files list. The
web2py_ajax.html view then iterates over the list of files in response.files
and inserts a link to each one. So, if your layout/view doesn't include
web2py_ajax.html, then nothing will happen with the files added to
response.files. For details, see the top of web2py_ajax.html.
Anthony