we do it w/out modifications to .ini file. simply:
in root.py,
from paste.urlparser import StaticURLParser
from tg.controllers.wsgiappcontroller import WSGIAppController
class RootController(BaseController):
docs = WSGIAppController(StaticURLParser('path/to/dir') , *
allow_only=predicates.not_anonymous()*)
On Sunday, August 25, 2013 3:58:17 PM UTC+3, alonn wrote:
>
> I have a staticapp - Actually a bunch of html and pdf pages generated by
> sphinx
> I want to mount it behind an existing tg app (2.1.3) to use tg auth and
> the existing users/password db
> I can mount it with paste deploy with something like this in config.ini:
>
> [composite:main]
> use = egg:Paste#urlmap
> / = mainapp
> /docs = staticapp #the staticmap
> [app:staticapp]
> use = egg:Paste#static
> document_root = %(here)s/appname/docs
> [app:mainapp] #in the default tg app this is app:main
>
>
> and then when I go to localhost:8080/docs I see the docs html.
>
> but I can't figure out how to protect it with a tg controller and auth?
>
--
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/groups/opt_out.