Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2170 (closed defect: invalid)

Opened 10 years ago

Last modified 10 years ago

Error handler in quickstart template cann't get images or styles

Reported by: aigarius Owned by: faide
Priority: normal Milestone: 2.0b5
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description

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:]

Change History

comment:1 Changed 10 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to invalid

please see #2171 and #2086

Note: See TracTickets for help on using tickets.