#2170: Error handler in quickstart template cann't get images or styles
------------------------+---------------------------------------------------
 Reporter:  aigarius    |       Owner:  faide
     Type:  defect      |      Status:  new  
 Priority:  normal      |   Milestone:  2.0b5
Component:  TurboGears  |     Version:  trunk
 Severity:  normal      |    Keywords:       
------------------------+---------------------------------------------------
 def img(self, id):
         """Serve stock images"""
         return self._serve_file(os.path.join(media_path, 'img', id))

 The above code from quickstart controllers/error.py does not work, because
 ObjectDispatchController._object_dispatch chops off the extension and
 instead of 'logo.gif' the method only gets 'logo' into its id variable.
 The extension is saved into tg.request.response_ext , but strangely it
 also contains the last symbol of the filename, so to fix the error
 controller I had to dd the following line before the return statement
 (both in img and style methods).

         id += request.response_ext[1:]

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2170>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to