'/cgi': {'tools.dynamic.dir':'cgi'}

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

'/cgi': {'tools.dynamic.dir':'cgi'}

gert cuykens

Is it possible to setup a dynamic directory ?

if  __name__ == '__main__':

    import os.path
    pwd = os.path.dirname(os.path.abspath(__file__))

    root = Root()
    root.cgi = Cgi()

    conf = {'/':    {'tools.staticdir.root': pwd },
#              '/cgi': {???????}}

    cherrypy.quickstart(root,'/', config=conf)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: '/cgi': {'tools.dynamic.dir':'cgi'}

gert cuykens



On Mar 7, 11:56 am, "gert" <[hidden email]> wrote:

> Is it possible to setup a dynamic directory ?
>
> if  __name__ == '__main__':
>
>     import os.path
>     pwd = os.path.dirname(os.path.abspath(__file__))
>
>     root = Root()
>     root.cgi = Cgi()
>
>     conf = {'/':    {'tools.staticdir.root': pwd },
> #              '/cgi': {???????}}
>
>     cherrypy.quickstart(root,'/', config=conf)

sorry i found out how to do it reading tutorial a few times

    def __init__(self):
        self.cgi = Cgi()

I still get a error from my js when i use the __init__ way ?

uncaught exception: Permission denied to call method
XMLHttpRequest.open


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: '/cgi': {'tools.dynamic.dir':'cgi'}

gert cuykens

On Mar 7, 2:11 pm, "gert" <[hidden email]> wrote:

> On Mar 7, 11:56 am, "gert" <[hidden email]> wrote:
>
> > Is it possible to setup a dynamic directory ?
>
> > if  __name__ == '__main__':
>
> >     import os.path
> >     pwd = os.path.dirname(os.path.abspath(__file__))
>
> >     root = Root()
> >     root.cgi = Cgi()
>
> >     conf = {'/':    {'tools.staticdir.root': pwd },
> > #              '/cgi': {???????}}
>
> >     cherrypy.quickstart(root,'/', config=conf)
>
> sorry i found out how to do it reading tutorial a few times
>
>     def __init__(self):
>         self.cgi = Cgi()
>
> I still get a error from my js when i use the __init__ way ?
>
> uncaught exception: Permission denied to call method
> XMLHttpRequest.open

never mind had nothing to do with cherrypy :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-devel
-~----------~----~----~----~------~----~------~--~---