You can still use the StaticURLParser, it's just that it was provided by
the Paste package ( https://pypi.python.org/pypi/Paste/1.7.5.1 ) not by
PasteDeploy :)
Just add Paste as a dependency of your project as now TurboGears doesn't
depend on it anymore.

If you want to avoid adding a dependency just for that, you can also use
webob.static.DirectoryApp which does the same  and comes with TurboGears.

Bests,
Alessandro

On Wed, Mar 4, 2015 at 4:00 PM, <[email protected]> wrote:

> Hello
>
> In my Turbogears 2.3.4 app I would like to serve some static files, while
> restricting the access to those files only to authenticated users.
> On Turbogears 2.2 I was able to that like this:
>
> In my root controller:
> from paste.urlparser import StaticURLParser from 
> tg.controllers.wsgiappcontroller
> import WSGIAppController
>
>
>   class RootController(BaseController):
>                         protectedStaticFiles = WSGIAppController(
> StaticURLParser(path), allow_only=predicates.not_anonymous())
>
> But using Turbogears 2.3.4 I cannot seem to find and use
> "StaticURLParser". It's not in paste.urlparser. I have PasteDeploy
> v1.5.2.
>
> Where should I find "StaticURLParser" or should I use something else? Thanks
> for the help
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to