[Twisted-web] Serving different resource types from the same
directory
Olivier Laurent
olilau.list.1 at gmail.com
Sun Nov 27 11:47:38 MST 2005
On 27/11/05, Eric Faurot <eric.faurot at gmail.com> wrote:
> On 11/27/05, Olivier Laurent <olilau.list.1 at gmail.com> wrote:
> > [...]
>
> The point of the resource name is to differenciate it from its siblings.
> If you give the same name to both of course it does not work.
> Moreover, I don't think '/var/www/' a valid resource name.
> Either use different "logical" names for each File, or use different
> processors for a single File.
>
> I think you want something like:
>
> my_resource = static.File(PATH)
> my_resource.processors = { '.pt' : PTResource, '.rst' : RSTResource}
That's it. One resource with several processors.
Thank you very much.
--
Olivier Laurent
More information about the Twisted-web
mailing list