Re: How to serve css and js in cherry py?

Joel Rivera <[email protected]>
Newsgroups gmane.comp.python.cherrypy
Message-ID <20160223103852.24db0f1f@graphene>
Hello Florin,

You have to change the link to the stylesheet from

<link rel="stylesheet" type="text/css" href="../public/css/custom.css">

to:

<link rel="stylesheet" type="text/css" href="/static/css/custom.css">
      
According to your configuration, you are exposing "public" as the url
"/static". No relative path is required (the ".." on the url).

Regards,
-- 
Rivera²

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.