durusmail: quixote-users: Building a community
Building a community
2003-01-02
2003-01-02
2003-01-02
2003-01-02
2003-01-02
2003-01-04
2003-01-04
Building a community
Neil Schemenauer
2003-01-04
On Sat, Jan 04, 2003 at 12:04:27PM -0500, Tom Jenkins wrote:
> Just a quick note for anyone looking at this code, it won't work as
> written.

Of course not. :-)

> The problem is for the url: /department/1/agency/5 the traversal stops
> at 'agency' with a TraversalError exception raised.  In Publisher's
> get_component method the container is checked for the existence of
> _q_exports.  The bound method 'agency' does not have this and so it
> fails.
>
> What I did instead was give DepartmentUI a _q_getname method.  i check
> for the explicit string 'agency'

I think a better solution would be to add "_q_exports = ['agency']" to
DepartmentUI  and "_q_exports = ['showSomeInfo']" to AgencyUI.  Adding a
_q_getname seems like overkill.

  Neil

reply