Opened 9 years ago
Last modified 9 years ago
#12550 closed defect
can't find iamge specified in theme.css — at Initial Version
Reported by: | galen_liu | Owned by: | Olemis Lang |
---|---|---|---|
Priority: | high | Component: | ThemeEnginePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Customize theme: Advanced
with style:
#banner { background: url(header-bg2.png); }
and I put header-bg2.png to my <trac_project>/htdocs/ The ThemeEnginePlugin can't find it.
Fix method:
svn diff Index: admin.py =================================================================== --- admin.py (revision 14965) +++ admin.py (working copy) @@ -97,7 +97,11 @@ return self._send_screenshot(req, data, path_info[11:]) elif path_info == 'theme.css': req.send_file(os.path.join(self.env.path, 'htdocs', 'theme.css'), 'text/css') - + elif path_info.endswith('.png'): + req.send_file(os.path.join(self.env.path, 'htdocs', path_info), 'image/png') + elif path_info.endswith('.jpg'): + req.send_file(os.path.join(self.env.path, 'htdocs', path_info), 'image/jpeg') + raise HTTPNotFound("The requested URL was not found on this server") def _send_screenshot(self, req, data, name):
Note: See
TracTickets for help on using
tickets.