Put your css and javascript into the
applications/myapp/static folder.
And in the view, call them like:
<link rel="stylesheet" media="screen,projection" type="text/css"
href="{{=URL(request.application, 'static', 'base.css')}}" />
(static being the folder, base.css being the name of the file, etc).
If you have subfolders in static, such as one for images and one for
javascript, you would do:
<img src="{{=URL(request.application,'static/images','myimage.gif')}}" />
And so on.
On Tue, Oct 6, 2009 at 4:12 PM, Eric Vicenti <[email protected]> wrote:
>
> Hi,
>
> I understand most of my site CSS and Javascript (which need no
> database interface) should be static files, but there is often the
> need to include URLs in CSS or JS files. How should I do the URLs such
> that the site is still portable?
>
> -Eric
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---