durusmail: quixote-users: Illegal Python Names cookbook recipe
Illegal Python Names cookbook recipe
2004-04-05
2004-04-05
2004-04-05
Bug fixes (was: Illegal Python Names cookbook recipe)
2004-04-07
2004-04-07
Bug fixes (was: Illegal Python Names cookbookrecipe)
2004-04-07
Patches for .7a3
2004-04-07
Re: Patches for .7a3
2004-04-08
StaticFile is broken (Quixote-0.7a3, scgi-1.2a2, Apache/1.3.27, FreeBSD 4.7)
2004-04-08
Re: Patches for .7a3
2004-04-21
2004-04-21
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-06
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
Re: Illegal Python Names cookbook recipe
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-07
2004-04-08
2004-04-07
2004-04-07
2004-04-07
2004-04-06
2004-04-05
2004-04-05
2004-04-05
Re: R: [Quixote-users] Illegal Python Names cookbook recipe
2004-04-06
Illegal Python Names cookbook recipe
Evan LaForge
2004-04-06
> On Tue, Apr 06, 2004 at 03:38:03PM -0400, John Belmonte wrote:
> > I'd prefer that the mechanics of Quixote remain simple.  It's easy
> > enough to build the mapping function on top of what already exists.
>
> +1.  It's regrettable that people who like to use '-' in their URLs have to
> pay a penalty, but I don't think it's really worth fixing.

It's easy to subclass Publisher and do advanced _q_exports processing (well,
I might make a '_q_rename = {'foo-bar': 'foo_bar'}' attribute).  You just
override get_component:

def _get_component (...):
    if (hasattr(container, '_q_rename')
            and container._q_rename.has_key(component)):
        component = container._q_rename[component]
    Publisher._get_component(self, ...)

... except get_component has turned into a module function instead of a method.
Why is that?  CHANGES just says:

    * Factored out the traverse_url() and get_component() method
    from the Publisher class.

Now we have to do something grody like mutate the publisher module.


reply